Having been a programmer for 20 years I have no idea why so many developers are so committed to Vim (other than it is available almost everywhere, which is helpful when doing things on a remote server).
I'm probably going to get down-voted to hell for this opinion here but it's literally the least productive, least intuitive, and most frustrating editor I've used.
But "learning curve" it's advocates cry! The time I have to spend getting up to speed with vim is better used actually programming, not to mention the people I know who are advanced users don't appear to code any faster than I do. A couple of occasionally used text operations are faster perhaps (though in modern editors it's debatable) but it appears to not have much cumulative effect.
As far as I can tell the only reason developers use vim is because developers use vim. It's a tautological tool.
I think you're missing out a little here. Sure, vim doesn't make you more productive. Sure, time spent learning vim is probably better spent programming.
However, vim is just great fun. That's why people obsess over it, fundamentally. It makes tricky and repetitive transformations of text intuitive and enjoyable.
This is such a fundamental disconnect from my idea of fun that I don't think we're going to see eye to eye on this ;)
> It makes tricky and repetitive transformations of text intuitive and enjoyable.
Given the fact that the number one phrase involving vim is "how do I do X in vim" I think intuitive is something that shouldn't even be in the same zipcode as it.
> intuitive is something that shouldn't even be in the same zipcode as it.
That's the thing, though. It's very different to non-modal text editors, so there's this learning 'cliff', where you get frustrated by how unfamiliar it is.
However, when it comes down to it - the neat thing about Vi is it's a re-imagining of what a text-editor is. Non vi-like editors essentially derive from the metaphor of a typewriter. You have a cursor, the print head, and you enter text there. You can use your hand (mouse) to change where the print head is pointing. You can highlight sections, as if with a pen - copy and paste stuff, as if you were using scissors. These functions are displayed a bit like the extra functions of one of those late-model electronic typewriters, where you could press a key-combination to get some neat functionality.
The nice thing about Vim is it accepts that editing text on a computer isn't like this. When you edit on a computer, you jump into a pre-existing text, mostly, adding or changing. So, for this reason, it has lots of functions for accurately manipulating sections of text, like words, or things between brackets, or sentences.
This kind of functionality is pretty standard for a good editor, but I think the thing Vi got really right is organizing these functions. The problem with having lots of functions is that they're hard to remember. So Vi structures them like a language.
So in the end, I think it's more intuitive than other editors. It doesn't work within the context of an outdated metaphor, and, it structures the functions that allow it to surpass that metaphor in a way that makes them extremely easy to discover and to remember.
> I think intuitive is something that shouldn't even be in the same zipcode as it.
The Vi keybindings and command set is largely self-consistent and follows common patterns. So while it might not be intuitive to someone unfamiliar with it, it becomes very intuitive once you grok the core patterns and concepts. There have been plenty of times I have strung together sets of commands and only noticed afterwards that this was technically a new behavior I'd never invoked before.
I suffered through learning "Brief" back in the 80s, and vim. The only feature I miss in modern editors is copying columns (usually from a bitmapping enum table). Not even drunken nostalgia is enough to make me want those control-this-that-or-the-other combos back. It's not worth the pain. It's impressive for me to see someone dance around the screen in vim, in the same way I watch somebody play a pipe organ with lots of ranks -- pulling this lever and stamping on that pedal and pushing this key and such while beautiful music pours out. Always impressive, but at what cost?
Besides, I like being able to see my code as it's executing, stop it, edit in place, back up, change execution points, etc. Maybe the visual editors have made me soft, but I can get far more done these days then back in the 80s anyway.
Take your well earned upvote! I've had many a person say the same thing to me about Vim and despite the fact that I like it, I can't see myself being as productive as I am in a normal IDE.
Genuinely curious if someone can explain how they're more productive in Vim than say Sublime? Take for example syntax highlight. If these things are feasible and easier, I'd really like to know.
People like the actual text editing environment and either don't care about the extra functionality an IDE would provide or just add such functionality as plugins. Since text editing speed isn't the primary limiting factor in producing software you may realistically not be much or even any faster whichever environment you choose unless the environment is actively horrible.
Fair enough. I would never argue that Vim's text editing functionality wasn't superior. However, the advocates I've encountered all touted it as superior, "...in every way." and I just haven't seen that.
Are you actually interested in having a conversation about why developers (like me) use vim? I've also been a programmer for almost 20 years. For me Vim+unix has outperformed VisualStudio (6-through current), Eclipse (and multiple derivatives), NetBeans, Xcode, and lots of smaller, language-specific IDEs.
> Are you actually interested in having a conversation about why developers (like me) use vim?
Sure! I'd love to hear your opinion. I will caution you: I've heard "it's just more productive" as a general statement so many times that if it's just that then I'm going to shrug and point you at my original post where I address that.
But if its something other than that - I love to hear it (even if I end up disagreeing).
I do note that you're comparing vim (a - feature rich - text editor) to massive, bloated, IDEs... I'm curious if you've tried other, often programming related, leaner text editors to compare? (ie, Sublime Text, VSCode, Notepad++, etc)
To summarize, for me most of the real work of programming happens in my head, and in my experience that's a much more powerful place to work when you train yourself to do it. In light of that, all the "features" of the IDE become bloat and distraction. What I need is a fast, responsive editor that doesn't get in my way.
> I do note that you're comparing vim (a - feature rich - text editor) to massive, bloated, IDEs... I'm curious if you've tried other, often programming related, leaner text editors to compare? (ie, Sublime Text, VSCode, Notepad++, etc)
Yes, exactly, and many of those are other good alternatives to Vim. Above is why I strongly prefer text editors to IDEs. I know Vim-style modal editing with basically a language of commands in and of itself is not a good match for everyone's mental model, but personally I'm at the point where I don't have to think when I'm manipulating text: it's all automatic, and extremely powerful. Moreso from a text-manipulation than any other editor I've used. That's why I'm with Vim specifically and why it's so productive for me. Vim+unix has become (over the years) the fastest way to author and manipulate large amounts of text: it's the quickest way for me to encode the model in my head in textual, language-oriented form.
> I doubt you'd be "outperforming" if you were writing Java in say Vim, over Eclipse/Intellij...which have vi-keybindings.
That's exactly what I'm doing.
----
edit If you're actually interested in a discussion: what does your IDE actually give you in Java?
* Syntax highlighting? Every code editor (including Vim) gives you that, especially for such common languages as Java.
* JavaDoc access? Cool, but not worth the overhead. I've got the JavaDoc up in a browser pane on my second monitor, easy to search, doesn't make typing laggy or crap all over my text editing pane like the IDE does, and isn't triggered until I actually need the JavaDocs. I've found that by looking them up myself and not having autocomplete I actually internalize the documentation better, which means I need it less. My brain is much faster at autocomplete than the IDE too.
* Automated variable rename. Again, cool. This is one of the few net benefits. Doesn't out-weigh the rest. And silver surfer/grep + Vim gets me 95% of the way there. The only real trouble is when you have lots of duplicate names for un-related things, and that's a bad pattern I'm try to eliminate in my code anyway.
* Debugger? This is a powerful tool, to be sure. But it's not IDE-only. And I've seen it abused. I've never been anti-debugger, quite the contrary. I love my debugger. But I've noticed that as I've gotten older and have developed deeper experience I use it less and less. In fact, I don't think I even have a debugger installed on my work machine right now!
* Automated refactor/etc. I'm convinced this is the cause of bugs more often then the fix. Certainly for poor architectural decisions. I've elaborated in other comments, but basically: train your brain.
That last one I'll emphasize. I don't want the IDE doing any of my thinking for me. It doesn't think it applies canned patterns which may or may not be appropriate. Certainly it can be used well, but the more you use your brain to do it the better your brain will be. And if you train your brain it will be accustomed to doing the work so that the value lives in you, not your IDE. Now it's language-agnostic. Now you can jump onto the next cool language without being hobbled by the lack of IDE support. Now you are forced to learn the details of all the tools your IDE is wrapping for you and are more prepared to actually solve problems with, for example, your build environment.
Of course, I'm not saying that it's a binary your brain vs the IDE thing, but personally I find it more productive to live outside the IDE all the time.
No. The top feature of an IDE is the call tree: Show me all the callers of this function and all of their callers and so on. This is a game changer. It means that you can reverse engineer someone else's code (or even your own). And in practice, that's what your spend most of your time doing if you want to make changes that are congruent with the whole system. Eve claims to have tools to help with this despite not being statically typed. If I get time I would like to try it because the querying and matching parts of the system are very attractive.
I'm probably going to get down-voted to hell for this opinion here but it's literally the least productive, least intuitive, and most frustrating editor I've used.
But "learning curve" it's advocates cry! The time I have to spend getting up to speed with vim is better used actually programming, not to mention the people I know who are advanced users don't appear to code any faster than I do. A couple of occasionally used text operations are faster perhaps (though in modern editors it's debatable) but it appears to not have much cumulative effect.
As far as I can tell the only reason developers use vim is because developers use vim. It's a tautological tool.