Why so many people love vim? I have a genuine question. I was trying to delete contents of a file and paste new content. It was nightmare for me to remember the 3 or 4 finger combination shortcuts with small and cap letters involved during the process. I like if the shortcuts using Ctrl or shift or Alt or Command or Windows buttons over 3 finger with caps changing keys. The cognitive load in remembering shortcuts is nightmare. Please give me a genuine opinion and justification. Does it really makes someone that productive? If they are keyboard wizards to type faster can't they do even faster with modern ides with similar proficiency. I know this topic is near and dear to many. Especially, the creator is died and folks can get even emotional. But I have same complaints about any terminal based ides. I just don't get complex long form keyboard shortcuts!
Vim is a nightmare if you don't use it very often. Moving around a text editor with a keyboard feels extremely strange coming from a traditional text editor or IDE.
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.
Very simply - Vim is a program that you are required to be a "poweruser" of to make work. You NEED to know most keypresses and shortcuts ( at some point, Vim is a language that you're speaking to the text you're editing ). This is not the case with most software - but find anyone that is a poweruser of any software and they'll love it to death.
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!
If you use vim every day, the common operations become muscle memory, I don't even think about jumping through the file, find and replace, block edits etc, they just happen.
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.
The point is you don't remember them, they become second nature, intuition, and you just sort of... do it without thinking. Assuming you've given time to learn it, editing with vim takes less mental effort and is faster.
I don't have a paper I can cite you, however if you talk to vim users most will tell you they feel more efficient and less friction compared to "normal" way of editing code. There's a reason this program is so popular and there are vim keybindings for any popular editor, after all.
As a vim user, I am 100% convinced that I am not that much faster than my colleagues who use normal key binds. However, I subjectively feel a lot less friction editing with vim keys than I do with the mouse and arrow keys. So Vim makes me happier...
This is the way I look at it. The productivity claims are probably a bit overhyped. For me Vim is just simply fun! It makes me think of the best way to do something, and there is always something new to learn. It makes me happy as well :)
While your perspective is totally valid, I think the idea that you always have to think about and learn how to use your editor seems to confirm the original commenter's point about the whole thing being too complicated.
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.
Same thing. Not sure why everyone is obsessed with the speed argument. Reducing cognitive load is the goal. How do you do that - with vim or something else like snippets or copilot or just muscle-memorying ctrl/shift-arrow motion is up to you.
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.
What source can he give you? It's clearly a personal annecdote that is shared between a lot of people that use vim. What kind of source are you thinking about?
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.
I'm not saying that you can't do it, you obviously can. It's just weird asking for studies for something that was clearly a personal annecdote. It's like asking someone: "Which knife is your favorite knife?" getting an answer and asking for a study that validates the answer.
You're talking about two totally different things.
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.
> "It would be nice to read some actual study showing this to be true"
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.
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.
Btw, did you know that ctrl/shift-arrow editors are also different? This also has something to do with my vim preference.
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.
I think this explains it very well https://learnvim.irian.to/basics/vim_grammar. You stop thinking about doing specific things tied to a specific keymap and you start to interact with your code using vim's grammar. Besides that, its nice having a consistent keymap between the different IDEs, text editor, browser and shell.
Personally I hate if theres a keymap that uses more than a two keys at the same time and I much prefer having a sequence of keystrokes like vim does, I do touch typing so it's natural for me to type a sequence, but if you introduce any modifier key I have to move my fingers from their position.
Also, you can find vim in most unix machines that you are going to interact with.
Vim's major benefit is that commands are composable. For example, `d` means delete -- but delete what? Well, that's based on the motion command you supply, from lines, to the end of the file, or even looking for a specific character.
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.)
Most "complex long form shortcuts" that Vim use are one or two keystrokes. Add an extra Escape key for switching between insert and command mode.
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.
> I was trying to delete contents of a file and paste new content. It was nightmare for me to remember the 3 or 4 finger combination shortcuts with small and cap letters involved during the process.
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.
The cognitive load of using vim is the same you have while riding a bicycle, or while typing with ten fingers on the keyboard.
After you get used, it's very easy.
You just need to study or to play with it, e.g. with https://vim-adventures.com/ !
Why do you love the way you do it? You're used to it. vim users don't have a cognitive load because 99% of them learned vim at the same time as learning programming. Is it worth it in 2023 to learn if you're used to a standard input method? Probably not, the majority of complexity in most people's job takes place in the mind and saving even a hour a day is likely not worth it - consider that even if there is no added cognitive load with vim, the fact that you can input faster means you're moving faster which can be exhausting. I for one, like the menial aspect of typing as a way of taking a break from everything.
If you install graphical Vim (gvim) on Windows, I think the installer offers to remap Ctrl-c and Ctrl-v to copy and paste. You also get the standard GUI menu bar at the top with Edit -> Select All, Edit -> Copy, Edit -> Paste which you can click on.
Edit: typo