But maintaining an up-to-date (n)vim setup seems like a huge time sink. In my experience, plugins are constantly deprecated and forked, or have breaking changes that need to be debugged. Part of this is just the open source dilemma.
For those of you who use vim as their primary editor, or have switched to/from vscode, do you believe all the extra effort required for vim is worth it?
In terms of efficiency/productivity/time saved, my guess is that it's not worth it.
In terms of happiness, I love it. I live in vim+tmux+bash. My setup is extremely personalized. If anything annoys me about my day-to-day activities, I can just change it. It can be a time sink, but I enjoy it.
It’s stable, it’s minimalist, and it mostly just works. It’s not a full-blown terminal IDE like NeoVim is trying to be - Vim has a different vision, being first and foremost just an editor, and leaving you to use the terminal as the IDE. (I’m not saying you can’t configure Vim as an IDE, but it’s honestly bad at that.)
If you haven’t yet, I would recommend giving good old Vim with a Vim9Script config a try. Install as few plugins as possible, to get familiar with the core editor before adding extra stuff. I would recommend starting with only two plugins: ALE provides plug-and-play LSP support (e.g. install pyright into $PATH and ALE will use it), FZF.vim provides a useful fuzzy searcher for navigating projects. Once you’re a bit more familiar with the core editor, I’d try out some language-agnostic useful plugins like rsi.vim, vim-sandwich, targets.vim, and maybe some language-specific plugins to e.g. enhance markdown or latex highlighting. But the core idea is that you don’t really need many plugins if you learn to use Vim as an editor. For instance, Git support? Just try to work with Git from the terminal first, and only install a plug-in for it if you feel like it is really useful to you.
IMO, part of why Vim has been an efficiency boost for me (before I started trying Emacs+Evil, NeoVim with the Lua ecosystem, etc.) is how little time I needed to spend configuring it. If you learn to use its built-in features right, it’s extremely stable, and after a decade you don’t need to spend much time thinking about it or maintaining it even if you frequently switch languages.
You either have too many plugins, or are in a part of the ecosystem where vscode is probably a safer bet right now (still maturing). My vimrc, including the few plugins I use, has barely changed in years (seriously, last commit 2021, last before that 2020).
Edit: Actually I have 10 plugins, so not as few as I thought. Stable ones, though.
The editor itself doesn't really matter.
Learning mode based editing with vim key bindings absolutely is.
You get like 90% of the benefit that brings with any editor that has good support for vim style interaction.
I still regularly use nvim in my terminal for quick edits here and there, but do my development in VSCode and spend a lot less time managing a config/plugins/etc.
My one suggestion is to change your escape binding to something like 'kj' or an easily accessible two letter sequence that doesn't appear in English text. Your fingers will thank you for it (even if it makes using default setups on systems you don't control a bit disconcerting for 30 seconds).
If you're working a lot with text, Vim macros are great. I'll regularly go into Vim as kind of a text workbench.
If you want to try an auto-updating Vim suite, check out LazyVim [0]. The defaults are great, and there's a lot of features with absolutely zero configuration.
It's 2023. Our keyboards are standardized (looking at you, Chromebooks) with control, alt, altgr, meta keys.
I can't understand why micro is the only console/cli editor that (partially) supports 1987's CUA standard[1]. All I want is TUI text editor or IDE that let me use Shift-Arrows to select text, Home/End keys should do what their names say, but if you hold Ctrl, they go to the beginning and end of file. I'd like to use use Ctrl-Ins/Ctrl-Del/Shift-Ins/ to access the Clipboard. Can we also have some menu or palette system, perhaps context-sensitive that includes every mapped shortcut? How about an easy system to create some windows or panes that can. E easily moved and resized? Wouldn't it be terrific if I pressed momentarily say, control-alt, and a calculator, calendar or a terminal showed up?
MS-DOS edit.com, Borland SideKick and Turbo IDEs had all these em 1991. I'm very fond of Midnight Commander editor, micro, joe, nano exactly because they have this DOS atmosphere, where the learning curve looked more gentle.
Linux and other unices got into a very interesting scenario. If the application is intended to run over a graphical desktop environment, it'll likely follow the CUA specs. OTOH, console/cli tools decided they don't care about CUA or current UI/UX practices (notable exception is micro), they will keep using standards created 40+ years ago, ignoring the standardization we've adopted since PC GUI massification around 1990.
Whether it’s “worth the trouble” for you really depends on you, what you value and what you do so it’s hard/impossible for anyone else to judge that for you. But if you’d asked 2000 me why I used vim I would have said because it’s great to be able to use the same editor for fixing config files over laggy remote ssh connections, or writing perl as for writing my email. If you’d asked 2005 me I would have said it’s great to be able to use the same editor for bash and python scripts as I use for massive Java and c++ codebases. If you’d asked 2011-ish me I would have said it’s cool that the editor I already know well supports these new languages I want to learn like haskell and scala, etc… Fast forward to yesterday and I spent 5 hours writing latex in vim and of course it works great.
So I guess what I’m driving at is this. You have no idea where life will take you and what you will end up doing but having this transferrable set of skills so you know whatever you’re trying to do with a computer you have a toolbox that you can apply to get a leg up on any new problem is very valuable.
The one real advantage of something like vim that is very hard for any normal IDE to replicate is that it could be part of that toolbox no matter what. You have to decide whether that’s valuable for you.
And you really don’t have to maintain any kind of up-to-date setup. I occasionally tinker because I like tinkering but the vast bulk of my vimrc I wrote in like 2002 or so and has remained unchanged. Every now and again I add a single line to add or remove a plugin, but it’s really not the be-all/end-all to make changes.
I'm curious what people's thoughts are with a slightly reframed question: is explicit practice with your editor worth it?
While it would be nice to edit more efficiently, it's usually not a bottleneck to how fast I can create software.
If you can always use an IDE then do that and don't worry about vim or emacs. There's no actual club of greybeard CLI hackers who will not let you join if you can't h-j-k-l everything.
If you need to work directly on a server over ssh, especially a server you don't control, you will probably have to use a terminal-based editor. If vi/vim is too much use nano.
Our brains can learn multiple editors, multiple programming languages, multiple frameworks, etc. I never understand the questions that pose a false dichotomy: should I learn vim or VSCode? Python or Clojure? You can of course learn them all. And if you use something every day you will get better with it. If you take the time to practice you will get even better. Whether that investment of time and effort pays off eventually, hard to say, but knowing vi/vim well enough to edit code has paid off for me and a lot of other people, so I'd call it low risk/potential high reward. I also learned VSCode well enough to use it, so hedging my bets.
I've tried switching to nvim too but I really like my vim setup so it never feels quite right.
If you can code in vscode and you like the interface than its probably not worth it.
> maintaining an up-to-date (n)vim setup seems like a huge time sink.
I find that updating plugins does often break things, which is why I don't update plugins (that are in a working state).
Neovim was introduced about the same time than vscode but I prefer vscode with a vim plugin. Before vscode and neovim I had many weird setups. The weirdest I used for a while was perhaps eclim, that is vim and eclipse together, but vim as the user interface. http://eclim.org/
If I were you I would start by enabling vim mode in vscode and practicing there. You get autocomplete by default and a familiar environment and can just focus on gaining keybinding proficiency. Then, as you get more experienced the new shortcuts you will want to define will come naturally.
1. Do you work on really large codebases every day?
2. Do you type as fast as you can think and frequently need to wait for the UI to catch up with what you just typed?
3. Do you have a large codebase sitting on a remote computer?
4. Do you have to ssh into random computers or embedded devices and quickly edit or modify something inside?
For me, the answer to all 4 questions is yes, I’ve been using neovim and vim before that for most of my career. I can strongly recommend it.
It does take a long time to learn all the features and get into the habit of using them productively. I would not claim to be an expert or without plenty of room for improvement. I would suggest some focused drilling of the core bindings and to at least read over a "starter vimrc" or something. There are a lot of defaults that are pretty bad, but you want to understand everything that you're putting in there.
One thing I haven't seen mentioned here is it depends a lot on your language of choice. I work mostly in languages with tool support that is inherently medium at best: Python (too dynamic) and C++ (too slow and complicated to compile, template duck-typing, build systems not standardized). I've tried many IDEs, plugins, language servers, etc over the years and found them wanting in professional settings. For smaller personal projects I've had much better results. If you're primarily working in something like Java with amazing tooling then the calculus shifts a lot more toward an editor that is designed with all the bells and whistles built-in instead of layered on top of vi.
Personally, there is an inherent pleasure to using vim that I think many people enjoy but are reluctant to admit. It's just fun to recognize 'ah I can get over there in 2 keystrokes this way' or recording a macro to knock through something that would normally be finicky. There's some tactile familiarity to when I played the piano as a youngster, but that micro problem-solving is enjoyable as well.
I think it's worth putting the effort in to learning core vim functionality. Once you do then you find that you don't need some of those plugins that you're having trouble with.
These days I run with a pretty light .vimrc and no plugins.
Nowadays I use kakoune and often get similar comments from friends watching me drive it, but I'm not convinced what they're seeing is really speed/efficiency - or if efficiency even matters much. The basic idioms and manoeuvres are just different so routine steps in editing look unfamiliar, a bit exotic and magical, just as nvi/vim does to anyone who haven't seen modal editing before.
Having heavily used both emacs and vi previously, I don't think I'd be appreciably faster or slower with either of them, but I'd use each quite differently and play to their strengths in the way they naturally lead you towards. For me, the big question is whether an editor feels nice, makes me happy and suits my style, rather than whether it is optimal in some way.
I tried ale (set it up to get out of my way) but had frequent stability issues with it, so it stays disabled unless really needed.
Apart from that, vscode is already significantly better than any options we had back in the day. It could be worth to learn vim for the sake of it, but my opinion is you’re really better off learning vscode ~programming to gain efficiency. Because all we really do to edit fast is programming an editor and calling its functions with shortcuts. Vim just happens to have a large stdlib for that.
I wish I didn’t know vim. That would prohibit the comfy low-energy state and motivate me to break programming walls and learning curves that advanced vscode unfortunately has.
That Free your mind from mental disruption of using mouse and clicking things and then put you in the zone for writing code, and then you can write code at speed of though, combined with a tiling window manager.
There are definitely moments that result in a bit of time sinking. Overall the tradeoffs work out for me.
And then when I open up (n)vim in a shell, the muscle memory carries over.
I've also tried SpaceVim and noticed that it was slower to start than VSCode --> uninstalled the buggy thing!
Next step in my ToDo list: learn VSCode shortcuts(multiple cursors etc) to improve the efficiency (I did use a plugin which gave me vim shortcuts but it didn't work well enough..)
That said to edit large log files I'm still using Vim, VSCode doesn't work well here.
Overall I don't think it's worth learning unless you're SSH'ing into production all the time, which is a bad but occasionally necessary habit. Otherwise you should expect to do your work on your own dev machine with all the software you want.
If you want to treat hacking your text editor as a hobby, sure, it's worth it.
IMO you'll get most of the day-to-day efficiencies of vim by using a vim-mode plugin in your text editor of choice. That's what I do at least and I'm happy.
It is stable, changes that affect the way you do things are incredibly rare, so once you build up a work flow you can be sure it will endure.
It also has a long history and won't go away any time soon.
You need barely maintained plugins to get basic functionalities and they're fairly slow and buggy.
Not worth it right now - but I open somebody rewrites nvim + plugins to make it an ide into a single, well tested, piece of software.
I still use vim (no plugins) and it's fine as a simple editor
Secondly people, especially with neovim, seem to be hellbent on turning the thing into a GUI editor anyway, with bespoke search interfaces, file tree plugins, graphical plugin installers, and so on. At which point I don't understand why you're not using something made for that purpose rather than painfully try to reinvent it in a piece of software designed to output text
Most modern IDEs have a straightforward enough vim plugin that just works in my experience (at least the JetBrains ones do).
I switch mostly between nvim and jetbrains products. nvim is my simple editor for adhoc stuff that I don't want to open an ide for.