Disclaimer: I am playing devil’s advocate. I do believe Vim makes me more efficient with some trade-off, YMMV.
We, as developers, spend a lot of our time on our text editor of choice. Choosing to use Vim, in my opinion, ultimately won't make a huge difference with any other editor. The majority of modern editors are more than capable to handle the task at hand and are much easier to get started with.
You want to use Vim? Sure. After you are vaguely familiar with it, you will dive deep into Vim's ecosystem and soon learn about the variety of flavors Vim comes in and the many ways to manage plugins and configuration. Suddenly need to code in Java? well darn, you'll need to expand your code completion, syntax highlighting, and add additional functions like compilation.
And after going through all of that, would you argue that you emerged out of it a stronger better developer? Or would you say it was all but a distraction and the time spent there could've been spent on coding and learning about other facets of programming?
I use Vim daily and I love it, but it's kind of difficult for me to recommend it because it truly is a time-sink. What the folks rave about is more about Vim-navigation and not Vim itself, and that is easily solved with Vim-mode, which is available in most editors.
So, what's your stance on the general push for vim?
Oldest comments (85)
I like the idea of working solely on a keyboard, but I don't know if I'm convinced that Vim is the best solution. I've been working on a "regular" editors like Atom and VS Code ever since I started programming, and I haven't seen a need to move to something as hardcore as vim.
Also, the fact that it seems "hardcore" feels burdensome and heavy to me. Tools are supposed to help you be more productive, and while there's a learning curve to everything, I think it what you said is true:
Personally, I love Vim for the same reason that some people love raising a banzai tree, or building a toothpick castle. If I've got the time, I like to fiddle.
Sometimes, yes, I just want to knock some code out, or navigate around a big project to get a bird's eye view of everything. At that point, I reach for VS Code.
But, if I've got the time, or what I'm working on isn't super important, I like taking the time to tweak my
.vimrc
to get things just right. And then, in a couple of days or weeks, I do the next bunch of tweaking. It's fun and it's interesting.It's relaxing to me to do something small and pointless, but to do it very carefully and to do it right. I don't know. Maybe it's a "when you focus on something small, all of the big stuff fades out for a while" thing.
I think that's the reason I'd recommend Vim to somebody. Not because it's "better than your current editor", not because you'll inherently "be more productive", but because you're interested in learning something new, adding another tool to your toolbelt, and fiddling. And I think that's enough reason to pick it up!
THIS. This so hard. I have NEVER been able to put it into words but oh man, this.
I feel the exact same way. The guy nailed it.
Emacs does also work well for this purpose.
I think it's the same as dvorak and qwerty keyboards. One can type faster on dvorak, but there is a lot of time invested in learning and practicing. If one have time to invest in Vim, I don't see any reason why not.
I personally think that there is to much programming subjects to learn, that investing much time in text editor is pointless.
No, Dvorak is significantly slower than QWERTY because you have to alternate more
Totally agree. It's like knitting or oragami, but you end up with a cooler workflow each time, instead of a bunch of knick knacks laying around the house.
To be honest, mouse-less access to any file I need to edit locally or on a *nix server. Vim keyboard shortcuts have been embedded into my brain since Uni days. But when it comes to heavier languages like Java I'd use an IDE not something like vim.
surprising, I've found that vim can do java development. one also needs Gradle and to actually understand java but that's a good thing.
I tend to agree, it's the navigation and some other best tricks that make vim so pleasant to work with. The package management is a bit of a pain though. A couple of months ago I decided to give emacs a go and soon afterwards I stumbled across evil mode and soon after that I discovered spacemacs. Spacemacs is fantastic all the joys of vim without the pain.
I like vim because it's lightweight. I've used vscode and atom starts out great you're loving it. You pop in vim mode and it's an easy transition. But eventually because electron sucks. It slows down with more than 2 plugins. So I get very noticeable input lag, and sometimes freezes. I want to like vscode or atom but at their core they are just trash. So I stick with vim
Besides all things here said, coding mouse-less saves you a lot a lot of time.
Also, If you need to edit a file over ssh, you can't install fancy editors. vi comes to the rescue.
I am vim user and I have tries to switch to other editors and the main thing that makes me switch back is the lack of the leader key in vim mode for any other editor out there. I have my key strokes that "save me time" intiated by the leader key. I just cannot find an editor that will allow me to do that without being another time sink to setup.:-)
Midnight ramble of positive things that spending a buttload of time in vim has given me is:
For the first one, I just install the highest rated vim binding plugin and it's off to the races.
In my last job it was randomly having to use eclipse on a project. Now it's moving over Visual Studio 2017, let alone the time I've spent in Unity's little mono develop thing, XCode, PHPStorm, etc.
I already have vim movement and editing commited to muscle memory, I just don't want to waste the brainspace on adding more hotkeys to temporary text editors.
The second one is important to me, probably shouldn't be, all things considered.
In my experience the one thing that Vim got right was keybindings and mapping. Modal editing does take away many pains of editing and does make you faster.
However, where I found Vim severely lacking was basically other things like:
My current setup consists of Sublime Text 3 with NeoVintageous for Vim like editing.
I believe it gives me the best of both worlds. Vim like keybinding and modal editing with all of Sublime's sublime features.
tag search, see ctags
fuzzy search, see fzf
multiple files, yeah it can do that with :buffer
vim's use of the unix philosophy to use other command line tools for extending features without bloat is another thing they got write.
I used all of those methods.
But modern editors such as Sublime and VS Code still provide a much better experience in those categories.
well one is more than welcome to use what they like. but please give examples of how x is better than y.
in this case, fzf and ctags also work with other tools out of the box so my email (mutt) client, file manager (mc), chat (bitlbee+irssi), and others has fuzzy search and tags. With that whole environment portable to thousands of machines online via git clone or docker image instead locked to one desktop.
Far and away better than VSCode especially on code bases with a lot of files - the command t plugin for Vim (I personally use fzf on smaller code bases) happily works across millions of files.
Vim is the friend you meet whenever you go and you always stop by to have a chat. No matter how cool you current editor is, at a certain point you will need to login into a server and you will have to choose between nano and vim. You make your choice.
Also, I code mainly using intelliJ with the standard editor, but with a shortcut I can enable ideaVim to do some nasty columnar ninja stuff and then I go back to the normal editor.
I wouldn't suggest to use only Vim for developing, but knowing it will help you in several situations.