HACKER Q&A
📣 loveparade

Is (n)vim worth the trouble?


My main editor for the past few years has been vscode, but I've dabbled in emacs (Doom), neovimm and helix. I keep coming back to vscode due to the plugin ecosystem and ease of setup. But sometimes I watch long-term vim users writing code and I'm amazed at their efficiency.

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?


  👤 hbien Accepted Answer ✓
I've been using vim (now neovim) for almost 20 years now.

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.


👤 drbaba
Unpopular opinion: Your problem isn’t Vim, it’s the NeoVim ecosystem. I know because I’ve had the same time sink problem after the Lua ecosystem took off, and have been much happier after I switched to Vim 9 and went back to my good old VimScript config. (Since Vim 9, the config syntax itself is a bit more pleasant.)

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.


👤 yjftsjthsd-h
> 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.

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.


👤 kromem
I've used vim, emacs w/evil mode, and currently use VSCode with vim plugin.

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).


👤 nnadams
I think it is completely worth it to learn the Vim editing commands. You can get a lot of the benefits from just turning on Vim-mode in VSCode or IntelliJ. Emacs with Evil mode is an improvement in my opinion as well. The quick line editing, moving around the file, etc etc smooth out your programming experience a lot.

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.

[0] https://www.lazyvim.org/


👤 3x35r22m4u
I've tried Helix for 3-weeks. The micro for half a week. I'm back to joe, nano, geanny, vscode,

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.

[1] https://en.wikipedia.org/wiki/IBM_Common_User_Access


👤 seanhunter
I have used or had to use multiple IDEs at various points over my unix career but for the first 4 or 5 years I was all about emacs and for the last 20 years I’ve used vim. It’s been fantastic for me and it continues to be useful every single day.

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.


👤 hamandcheese
Im in a similar boat as you. My editing skills seem to plateau pretty early without any deliberate practice. And I always have something I'd rather do than sit down and deliberately practice editing.

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.


👤 000ooo000
Why does your setup need to be always 'up to date'? I update mine periodically, usually when I update Arch and the nvim package updates. I might spend a few hours tweaking things then, but that's monthly or less. Sometimes I'll do it sooner if I'm actively tweaking nvim to my liking (for fun). I don't see it as a burden really. I like what Neovim provides me the other 99% of the time. If you like the batteries-included nature of VSCode, you could try an nvim distro (e.g. LunarVim), or just use VSCode. I can't use Neovim at work (sEcUriTy..), so I use VS Code. It's good enough, but I definitely don't enjoy using it like I enjoy using nvim in my terminal-based workflow.

👤 gregjor
I used vi and then vim for years (decades) before VSCode came along. At the time I learned vi it was worth the effort, because the alternatives were terrible. For me learning vi/vim has paid off, but I learned it over time, out of necessity, with some deliberate practice.

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.


👤 sanswork
I use vim and I don't think it's extra effort. My vimrc has changed once in the past 3 years. I keep trying vscode because I read about how much better the plugins are but I find with most I'm not really getting that much extra value.

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.


👤 qwery
Yes, it's worth it. Unless you disagree, in which case it's not. I use neovim and vscode (and others) for different things or just because I feel like 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).


👤 speedgoose
Learning vim shortcuts is worth it. Or the eMacs ones. Pick your poison. The eMacs ones are a bit more common in more applications but I personally have more muscle memory with vim.

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/


👤 djsavvy
Absolutely. As others have mentioned in this thread, by far the largest benefit to effort ratio is from learning the vanilla keybindings and becoming fluent in them. All the custom key maps, plugins, and settings come later.

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.


👤 dilippkumar
nvim is worth the investment if your answer to any of the following questions is yes:

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.


👤 recursivecaveat
I've been a (n)vim user for many years. I don't think I have ever deliberately updated a plugin. I have 2 that I use and I just git clone their repos on a new machine. (fzf and git-gutter if you're interested, I should really sit down and learn surround however).

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.


👤 scrapheap
> 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.

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.


👤 qhwudbebd
I'm a user of neither neovim not vscode so wouldn't presume to advise; I'd just like to make an observation on "sometimes I watch long-term vim users writing code and I'm amazed at their efficiency".

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.


👤 wruza
In my opinion, turning vim (or any editor for that matter) into and async ide was not a good idea. Because random latency requires attention and kills both speed and attention elsewhere. I don’t know why exactly Bram resisted it, but I like to think he understood editing better than most. Nvim was the apotheosis of that conflict.

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.


👤 v3ss0n
The main thing vim gives you isn't just editing efficiency and customizability. What it give is Zen- like focused state of mind when you don't need to use mouse.

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.


👤 battesonb
I switched to Neovim because of RSI. I don't think I would have been able to keep my job without it. I know the other editors have Vim emulation plug-ins, but I found I would always reach for the mouse if I didn't know the keystroke(s).

There are definitely moments that result in a bit of time sinking. Overall the tradeoffs work out for me.


👤 gsuuon
For pure productivity reasons it's not worth it unless you don't fiddle with your config. Messing with config can indeed be a massive time-sink, unless you enjoy it, in which case it simply becomes another hobby. It's definitely possible to use and spend very little time on config, though you'll be missing out on a huge part of the joy of (neo)vim - customizing your editor experience.

👤 MathMonkeyMan
I use vscode with the neovim extension. I'm no vim aficionado (I still use the arrow keys...), but it's good to have the vi bindings in an IDE. It even supports variable width fonts!

And then when I open up (n)vim in a shell, the muscle memory carries over.


👤 renox
Ex-vim user here. No, I've tried it many times and finally I'm using VSCode for good: I don't think that vim is good enough as an IDE unless you accept to change your workflow to adapt to vim.

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.


👤 threatofrain
If you use neovim then I highly recommend one of those all-in-one kits. It may seem monolithic and not editable... but it's actually quite modular and can be incrementally grokked or modified if desired.

https://astronvim.com/

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.


👤 Zanfa
If your goal is to write code and treat vim as an IDE, no, it's not worth the effort. The quality of plugins is generally atrocious and when something inevitably breaks / doesn't work out of the box, it's somehow especially difficult to debug.

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.


👤 kagevf
Consider using vim for side tasks to augment your main VS Code use, and maybe you'll make some useful discoveries while gradually getting use to it, instead of going all-in.

👤 roydivision
As someone who works across multiple machines one of the biggest advantages of vi(m) for me is its ubiquity. It's almost always there, doesn't rely on a GUI (ssh connections).

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.


👤 jokethrowaway
I switched to nvim for a time and dropped it after a few months.

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


👤 Barrin92
vim bindings are worth learning, vim/nvim itself is not. Two reasons. One, graphical debugging. Almost every hardcore vim/nvim user I've met has terminal (no pun intended) printf-debugging disease, or uses an IDE on a second monitor. Carmack talked about it in an interview (https://youtu.be/tzr7hRXcwkw)

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


👤 molteanu
If it's a "trouble", then no, it is not "worth it". Use whatever works for you.

👤 taormina
I've used vim for about a decade now and learned about it in college from friends. Having vi available on nearly any box makes it very universal.

Most modern IDEs have a straightforward enough vim plugin that just works in my experience (at least the JetBrains ones do).


👤 mu53
if your plugins are constantly getting deprecated, your setup is just too niche or bleeding edge. Use plugins with a large community already

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.


👤 spindle
No, but it's FUN!

👤 deafpolygon
Simply put: no. I realize that there are a lot of adherents who will judge me harshly for saying so, but that is the simple truth.

👤 xrayarx
I have been using ed for decades now, because it is the standard.