since there are quite some comments highlighting the effectiveness of a good VIM setup and muscle memory of 10+ years, I would like to know your opinion on starting to get into it now (end of 2022).
For context: I'm a backend developer with 10+ years of experience, mostly using Java IDEs, and lately some vscode (for go, typescript, rust). I have some knowledge in vim, and can use it for basic text editing, but I still use the arrows for navigation, and found the "hjkl" navigation difficult. I'm somewhat experienced using linux and the terminal, and would be curious to dig deeper into more terminal-based workflows.
The question is: do you think it's worth the effort to learn using VIM more deeply today? The goal would be to at least be able to do the go and rust coding in vim, it doesn't need to be a full Java IDE. Bonus points for an opinion about "If yes, do you think VIM is still fine, or rather neovim? Or something fresh like helix?"
Thanks a lot!
I've used Notepad++, Sublime Text, Atom, and Visual Studio Code. Each of these has introduced game changing improvements (ST has popularized the command palette, Atom allowed high quality, well integrated, and easy to write extensions, VSCode improved upon Atom with way better performance, brought LSP, and drastically improved the remote dev experience). They have in common that switching from one to the other is extremely easy. When VSCode dies, it's because something better has emerged, I'll just have to install the VSCode keybindings on this new editor and I'll be good to go. Because this new editor will adopt the common conventions that everyone use, unlike Vim.
I've used Vim for a year, became pretty efficient with it, but it always feels like it's playing catch-up with other editors. And the modal editing feels more like a gimmick than something really improving productivity. I sometimes open Vim to do some data cleanup, because Vim moves make it easier than writing a script. But when writing code I never think "damn, typing 3dd would be so much faster than selecting 3 lines and hitting delete"
But disagree with this:
> I never think "damn, typing 3dd would be so much faster than selecting 3 lines and hitting delete"
I actually do think that all the time, and get annoyed when I have to take the second or so to move away from the keyboard to find the mouse/trackpad.
Need to delete three lines, starting with line 54 at the top of your screen? 54gg 3dd
I would never reach for my mouse for that unless I had to.
In fact I believe the motions are way more universal than any particular editor's key bindings. There's plugins and extensions for vim motions in almost all editor's I've used barring some database specific UIs.
I'm not particularly worried about switching to the next one someday nor do I feel like I'm missing out for taking 15m longer per year for the rare server editing of files compared to if I had spent 100+ hours learning vim.
VIM is already installed everywhere you need it and does not require you to have a workstation with a GUI
Meanwhile, I can use vim over ssh from an iPad if I need to - my tools have come with me.
Learning enough Vim for it to pay off in terms of productivity and whatnot is quite a journey. If you are committed, it might take a couple months to follow chapters 1-12 and 20-32 of the user manual, which will put you in a better position than most Vim users. If your goal is really to be able to use Vim for Go and Rust projects, then there is no way around that first step, but if you somehow don't go all the way, then what you have learned will surely come handy next time you have to use Vim so there is no loss, here.
> do you think it's worth the effort to learn using VIM more deeply today?
I did that and I really love where I am. Will it click for you? I have no idea.
> If yes, do you think VIM is still fine, or rather neovim? Or something fresh like helix?
- Vim (not VIM) has been in active development since 1991 and it is not showing signs of slowing down. It is more than fine.
- Neovim is merely a fork with different goals. At a low level, the two tend to diverge more and more but when it comes to the core user-facing stuff like Ex commands, modes, operators, motions, etc. there is practically no difference.
- Helix seems promising but it is far less ubiquitous than Vim.
Everything is worth learning, whether you have an immediate use for it or not.
As for VI vs emacs - both are good. I would search YouTube for 'Top 10 VIM plugins' and 'Top 10 emacs packages' and see if either grab your attention and go with that.
For more modern systems, you can end up in BusyBox and not have access to nano (I think you can specify that vi gets included in BusyBox).
Once this basic-but-crucial skill level is mastered, using vim more proficientely as a daily driver is entirely a matter of taste. Personally I prefer using a fully-fledged IDE for anything that goes beyond a simple script.
Windows?
Nowadays I just use a GUI, and only use vi for editing config files and the odd program on a remote system. But even that's being supplanted by editors with remote capabilities.
It's absolutely worth it to learn enough basics to edit files. Beyond that, only if you really dig the editor.
In my opinion, Vim/Emacs are the best way to make that interface as easy to operate as possible, since it completely removes the mouse from the equation. Along those same lines, I felt so much liberated after switching to i3, insomuch that I try to replicate the experience on MacOS, after switching over for work.
EDIT: Also, the obligatory "You don't grok vi" SO answer: https://stackoverflow.com/questions/1218390/what-is-your-mos...
I live in a terminal except for the browser. Of course my xterm bindings are always vi-mode and tmux too. I have key bindings to unite all my i3/tmux/vim 'getting-around' keys and also fought that fight to unite the clipboards, even across VMs etc.
Getting back to why I say 'no' is because once you're used to the modal, and getting around with the usual vim motion keys, it makes using anything else near impossible and clumsy. I have great difficulty composing text in browser (like right now) and also emails, etc. And if any editor online allows vim keybindings, you must make sure that you are used to defaults otherwise the vim-mode won't do you much good. Like escaping with CTRL-[, or delete word with CTRL-W, which closes the tab in the browser (firefox and chrome and I never found a way to turn that off, so I lose a lot of work that way). For instance godbolt and leetcode both had vi-modes but there's enough of a difference, even though I try to use nearly all defaults, that I still end up composing any code/english in another terminal window.
I am completely hopeless using a mouse or arrow keys. If I have to go to on-site interview and have to use something other than vim, well it makes me look like I haven't sat down at a computer in 15 years. I am a hostage now to my habits and am very wary of hopping over to VSCode/CLion/jetbrains whatever else because I will be a fish out of water.
I don't feel the need to use vim exclusively. I like IDEs too, but will probably continue using vim in some capacity so long as it's useful.