Edit: typo
Edit: typo
However, once you get used to it, it's absolutely amazing. You can move as fast as your thoughts, sometimes faster.
I forced myself to use Vim for two weeks after having been a long-time eMacs user (and Notepad++ prior to that). Those two weeks were hell. I felt like a baby learning how to walk.
It felt like second nature a few months later, and any editor that didn't have keybindings felt primitive a few months after that.
Because most things can be done 10 different and equivalent ways, you develop your own personal way of interacting with it, and it's "personalised" to your workflow - not by design, but because you won't remember things you don't use/understand.
Learning Vim shows you to rely on yourself and to persevere, and if you do it you are likely to stick with it. Just like Emacs!
For me personally, the context in which I edit files changes constantly - sometimes it's inside a Docker container, sometimes it's on a server, sometimes it's on my personal Linux machine, sometimes on my work Mac... Vim is easily available on all of those, and I just use the default configuration.
I do see my colleagues benefit from VSCode. If my work environment was very consistent (same computer, same language) I think you're right that I would possibly gain in productivity from using VSCode (with Github Copilot, perhaps). But my work environment is not consistent, so Vim it is.
I had a coworker who swore that X was the fastest way to do Y. Turned out it wasn't and X just made him very busy hitting keyboard quickly.
To which I say, I've been using Vim (and nVim) for more than 20 years now, and the learning part is optional after a year or so of intense use.
Asking why people prefer vim is like asking why they prefer skateboard over rollers. You’re proficient at what you learned the most. The only thing you have to keep in mind is that every tool has its limits, so choose what you’re going learn from that perspective as well.
Are you saying that studying how efficient various text editors are for some groups of people is not possible?
Here's what I believe to be an example of some study on how text editors compare:
https://mjambon.github.io/vim-vs-emacs/
Not saying that this is a good study - I haven't even read it. Merely providing it as an example that at some point a study has been made in this area.
> Assuming you've given time to learn it, editing with vim takes less mental effort and is faster.
What gave away that it was a personal anecdote? I interpreted the "you" part as if he was speaking generally about other people and not only himself
In my main language, we would have written something like below if it was a personal anecdote (rough direct translation):
> I was able to edit faster using Vim after taking the time to learn it.
GP is saying Vim users generally have muscle memory of their shortcuts (I might add, to the extent that some of them may not even be conscious which keys they are pressing). GP also mentioned that Vim takes less mental effort (due to muscle memory) and is faster.
The faster part is easy to argue even from a theory perspective. Your hands basically never leave the home position. The time saved from physically moving your hands to and from various keyboard/mouse positions are reduced. At least Vim can be faster in that sense.
You're saying you have a personal anecdote about a coworker (who from your description isn't necessarily using Vim). How is that relevant?
I keep reading and hearing folk claiming that X is faster, as in this thread. It would be nice to read some actual study showing this to be true, but it seems like it mostly ends up being strongly held opinions based on anecdotes.
You say it's easy to argue. Sure, it's easy to argue but that doesn't make it correct. I could argue in the other direction and then we end up wasting our time.
Perhaps an objective, statistical significant study helps you decide, but ultimately, some people are more productive in Vim, and some people aren't. A study just gives you the average, but it doesn't necessarily imply anything for your personal experience with the tool.
Arguing what is "correct" here is a waste of time TBH. Nobody is really trying to prove anything. The person you originally replied to was trying to answer "Why so many people love vim?" . It's not because it is "objectively faster for everyone who uses it, provable in a reproducible large scale study", but rather because people perceive it making them work faster.
You don't have to accept the answer. Just leave it be.
https://danluu.com/keyboard-v-mouse/ - concludes that it varies by situation; keyboard wins at tasks where you might expect keyboard to win, mouse wins at tasks where you might expect mouse to win, tools like regex search/replace wins at tasks where you might expect it to win.
The cognitive load is no greater than it is to remember that Ctrl+C is copy and Ctrl+V is paste. Once you learn them, you don't think about them.
It’s unclear how I got there. It was long ago but my guess is two key things: I believed in rumors/stories and I didn’t give up.
Tbh, if vim wasn’t vi-like, I’d still use it for its programmability. <- This is the main point beyond learning curve. Maybe I’d like emacs too, if I learned it. Or other modern editor. I’d even use vscode as it looks nicer and has many widgets, if only it wasn’t such pain in the ass to program and/or tune up to your taste.
I’m certain that everyone has to use what fits their personality.
(Added: not concerned with speed or whatever unless an editor starts choking or popping up interfering crap randomly. I use mouse when it’s convenient and mostly move with arrows except for AIO^$ - I don’t have homerow discipline anyway.)
I know this topic is near and dear to many
Not at all for me. Vim is not everywhere and when I have to take a quick note or copy-paste I often open Notepad2 (because I don’t want to switch between editing models). I just prefer vim model when it comes to long/structured editing sessions.
When you use it, either in a text field or in an editor, there’s a little uncertainty where ctrl-stops are and how the cursor behaves regarding EOL. Is symbol/char a ctrl boundary? Does it jump forwards at the same positions like backwards? If I move up to a shorter line, will it retain a column index and an EOL flag? If I <End>, does it have EOL flag at all? Which way do you select whole lines? Home shift-down? Home home shift-down? Ctrl-L? You want to select whole lines to not deal with extra indent on paste. Or does an editor fix that?
There are lots of editors that behave differently. Almost all of them.
What bug me in it, is that you now have to wait for ctrl-arrow to finish somewhere, but you don’t know where. So, combined with a high repeat rate (which you want unless you like watching a snail to run or paint to dry) it becomes a release-timely game. I definitely remember struggling with that when I still used windows-style editors.
It would be not an issue if I chose one and used it. But they die or get ancient wrt useful plugins so quickly. Norton, borland, ulti-something, notepad++, various IDEs, linux zoo, sublime, atom, vscode. There’s no end to it. One decade and it’s either “obsolete” or requires a high-end ssd to just start.
Perhaps a better discussion: https://ferd.ca/vim-and-composability.html
Edit: Another benefit: vim works very well over all sorts of connections, even ones that do not support the full set of Control/Shift/etc. For some of us, this is very handy. (Also, vi, the ancestral editor to vim, is very small and often available in environments other editors do not fit into -- and the commands are much the same.)
While I'm a heavy vim user myself, I'm not sure if it really makes me more productive. But it is more fun to me than, e.g. working with VS Code.
The "normal" Ctrl/Shift/Alt/Command/Meta shortcuts are two keystrokes as well.
I think it's a matter of preference and habit. I like not having to move my hands away from the home position of the keyboard when I'm intensely typing. Perhaps some people have much greater accuracy than I do when (for example) moving their hands to press the the arrow keys and then returning to the home position. For me, that distracts me a tiny bit having to spend brain cycles to check whether my hands are in the right spot.
Just sharing a personal anecdote.
Oh btw, why do so many people "love" Vim? It's been around for decades. I'm pretty sure unless you use Emacs, you've changed your main text editor over time. The most popular one today, VS Code, didn't exist a couple years ago. Not sure what people used before that, but IIRC no mainstream text editor was around for so long, on so many different platforms, and in such a consistent manner.
Vim has been around for 30+ years, and I've personally been using Vim for 20+. It's easy to be attached to something if it has been around for so long, and so consistently.
And also, sometimes, maybe, when a creator pours love into a product, the users can feel it. Maybe.
Vim rarely uses multi key combinations like emacs or most other editors do. Copying and pasting involves some knowledge of how the copy registers work. It can feel confusing when you first try it, but you figure it out eventually...
> Please give me a genuine opinion and justification. Does it really makes someone that productive?
The best way I can explain this is that vim is language. The process of editing in vim involves speaking this language. And once you're used to it, this language itself helps you reason about and execute editing tasks faster. It's also faster because the commands are very concise, and imo pretty easy to remember because they are mnemonics for the operations they perform. Imagine a task like selecting a string in quotes and changing it to something else with a mouse. In vim that's <ci">. c(hange)i(nside)"(doublequotes). Performing this is as instant as having thought about it.