Most active commenters
  • heavyset_go(4)

←back to thread

538 points todsacerdoti | 14 comments | | HN request time: 1.302s | source | bottom
Show context
robenkleene ◴[] No.44358285[source]
I love this, I've been iterating on workflows like this for something like a decade now. Over time I've tried to peel back as many of my custom layers as possible, because all of those layers have a maintenance cost.

Stock Vim (without `tmux`) can actually do most of what's shared in this post with `rg --vimgrep restore_tool | vim -c cb -` (`vim -c cb -` is my favorite feature in Vim; I find it strange that it's so rarely used or talked about).

(Since re-running the `rg` search can be undesirable, and I often like to analyze results in a terminal before opening them in Vim. I use a custom `tmux` command to copy the output of the last command [using this trick that involves adding a Unicode character to your prompt https://ianthehenry.com/posts/tmux-copy-last-command/], then I send that into Vim with e.g., `tmux saveb - | vim -c cb -`.)

replies(7): >>44358653 #>>44358736 #>>44360925 #>>44362611 #>>44363893 #>>44364510 #>>44403351 #
1. heavyset_go ◴[] No.44364510[source]
Can someone sell vim to me?

I can't help but see it as the tiling window manager of text editors.

Even with plugins it's less featureful than Kate or Jetbrains IDEs. And the last time I really gave it a go, it was slow, which is surprising for a terminal text editor.

If I need to edit text via the terminal, micro has mouse support and keybindings that match what you'd expect in any OS.

I don't like the idea of thinking people who use vim are insane, it obviously has value and people who use it have good reasons for using it, but I can't see it as more than a niche nerd thing a la tiling window managers.

replies(8): >>44364772 #>>44364783 #>>44364962 #>>44365274 #>>44365927 #>>44366746 #>>44367516 #>>44391506 #
2. skydhash ◴[] No.44364772[source]
Vim has it’s advantages:

- Fast and precise navigation (jumping to files and jumping to some point in the file)

- Fast editing command (there’s no need to select first, and when you need to selection is fast due to the above)

- Easy extensibility (either custom commands which you can bind to keys, or hooking some logic to editor’s event)

- Integration with external tooling (using the text as input, collecting the output, intepret the output to find location to jump to)

All of these are first citizen in Vim, whereas in some editors, it can only be done with plugins.

3. agarsev ◴[] No.44364783[source]
I use both (neovim instead of vim, i3 as wm) and you got me thinking. I think the point of both is actually not having to use the mouse. But the mouse is not the problem per se, probably is the spatial/visual interaction paradigm. I don't care where the window exactly goes, I just want it right/on top/minimized. I don't want to search visually for a button that does what I want, I know what I want, I can just "tell" the computer. It's not about keybindings as shortcuts to do something, it's talking to the computer via keyboard using my language center without the intermediary of the gesture/spatial metaphor. Maybe? I just thought of this sorry.
replies(1): >>44372477 #
4. bonoboTP ◴[] No.44364962[source]
I think the sort of person who likes it values the "test of time" aspect of it and trust that vim will still be there in the next three decades, just as it was there for the last three. It's super easy to install, and is indeed preinstalled on almost every Linux installation. So people can learn its ins and outs and do extremely fine-grained customization to their desire. People who get annoyed by tiny details and don't want to put up with it. The downside is that you need to carry around your config files and if you sit at a colleague's computer you don't get the same standard experience. And the fragmentation.

There's of course also the "hacker street cred" aspect of it, to feel like a real serious developer. Or simply being fed up with churn and saying "I'm too old for this shit". JetBrains IDEs might change next year due to some new design fad. Or they may go bankrupt.

In my opinion, valuing boring old tech is good, but you shouldn't make a crusade of it. I choose to put up with some churn and inevitable tool changes for practicality. Yeah, some things have to be relearned this way, some changes seem pointless, but the overall effort may be less if you just learn to be flexible and say "ok if JetBrains goes bankrupt, I'll just learn the next popular IDE like everyone else and be done with it" instead of prepping in my bunker with my vim config files.

replies(1): >>44373184 #
5. rhinoceraptor ◴[] No.44365274[source]
vim and tmux both have mouse support as well, it's nice to be able to resize vim splits and tmux windows with the mouse.
6. thesuperbigfrog ◴[] No.44365927[source]
Vim and related vi-based editors have a built-in 'grammar' for editing text that is concise:

https://stackoverflow.com/questions/1218390/what-is-your-mos...

With a bit of practice, vim/vi-style editing can be developed into muscle memory which makes it incredibly fast to use.

There is a reason why most popular text editors and IDEs have a vim plugins.

7. ◴[] No.44366746[source]
8. maleldil ◴[] No.44367516[source]
> And the last time I really gave it a go, it was slow, which is surprising for a terminal text editor.

There was likely something wrong with your configuration. It's really hard to be faster than vanilla vim, but you can get weird performance issues from external plugins sometimes.

replies(1): >>44371342 #
9. heavyset_go ◴[] No.44371342[source]
I used some Vim IDE plugins and I assume the bottleneck was there.

The problem is without some IDE-like features, I don't have a need for a text editor. Micro supports LSP servers by default and that gets me pretty far, before jumping to Kate or a real IDE.

replies(1): >>44374474 #
10. vladxyz ◴[] No.44372477[source]
It's this. I make the analogy to playing a game with a controller. At some point you stop thinking what combination of physical button presses and holds you need to have your character go from a running start to a crouch-jump, you just think in terms of goals for you want your character to accomplish. vim motions put you in the same sort of connection with the text you're editing.
11. heavyset_go ◴[] No.44373184[source]
I definitely get that, I feel the same way about Bash. It's stood the test of time, is everywhere and will be everywhere for the foreseeable future.

Thanks for the perspective.

12. maleldil ◴[] No.44374474{3}[source]
The question is which plugins you used. My neovim configuration gives me "IDE-like features", yet it's noticeably faster than VS Code and others. Also, neovim has native support for LSP too.
replies(1): >>44381370 #
13. heavyset_go ◴[] No.44381370{4}[source]
Can you recommend any plugins that you find useful?
14. xk_id ◴[] No.44391506[source]
Vim existed before Jetbrains IDEs. It’s also much more general. I use Vim to write literary works and manage my knowledge base. There was also a guy who was using Vim as his IRC client. Vim can be the only program you need for editing text, which turns out is most of what we do on a computer. It’s nice to have a single tool for this, that never resists when you try to adapt it. Vim is actually a great example of the practicality of a good philosophy.

Edit: I doubt there’s any feature in the more specialised editors, which you can’t also get from Vim.