I once did a lunch and learn at work where I tried to teach coworkers how to use vim efficiently. It turned out to be the absolute worst lunch and learn I ever did.
It's just so unintuitive and trying to teach it in a "here are some good shortcuts that will save you time" way was a near-total waste.
vim is the closest any editor comes to interfacing directly with my brain. Once you learn to make your neurons fire in the right way to move the cursor to the right spot, it's easy and there's no better way to edit code. Describing the neuron firing order to someone else, though, is futile.
It's like learning to to use your fingers to pick something up for the first time as a kid: you just have to try enough times until it sticks.
> vim is the closest any editor comes to interfacing directly with my brain.
It's funny you mention that. Just today, I had this moment where I realized that if someone asked me which key letters are used to move up/down/left/right, I'd have to pause and think about it.
I've been using Vim for years. Like, my index finger rests on the down key, so J is down. I think? And so on... My middle finger rests on the up key, so K goes up? Do I actually have to move my index finger to go left? What is my pinky doing most of the time?
It's just funny how all this stuff is burned into my brain but I wouldn't even be able to tell someone the basics without a keyboard in front of me.
It's even weirder for me as I use the Colemak keyboard layout.
When I first switched to Colemak, around 2010, I remapped the movement keys so that they were in the same physical location as hjkl on qwerty.
Then I realised I'd lost compatibility with other readline based software. So I just learned to use the new, not particularly ergonomic, positions under Colemak.
At this point it's almost always from muscle memory now and couldn't tell you what I press half the time.
Vim is like the Great Glass Elevator, it has a button for moving in every direction and using it since the 90s has been like learning to play a musical instrument.
>Vim is like the Great Glass Elevator, it has a button for moving in every direction
Actually vim is more like the Great Glass Elevator cum Excavator, because it has buttons and levers (to extend your simile) for moving in every direction and performing operations of every kind, and most importantly, all sorts of combinations of the two:
So, if tomorrow, either more movements or more operations were added to vim, they would automatically play well with the older ones.
This is orthogonality (1), and genius, IMO :)
(1) As they mean in microprocessor ISA design (, I think, not being a hardware guy, but have just read about it a little here and there, while doing assembly language programming years ago).
> so J is down. I think? And so on... My middle finger rests on the up key, so K goes up?
Nope, j is down. J combines the current line with the next line, reducing whitespace between to 1 space.
Back when I first figured out what J was doing (having typo'd it regularly) I thought it was useless, then one day I just started reflexively using it when manipulating function arguments.
Likewise, k is up, K looks up the word under the cursor in a man page.
Passwords are the same way for me. I can type my password on a keyboard, but if I have to enter it on my phone, I have no idea what it actually is. Thankfully, a password manager deals with most of my passwords but there is a few that I don't use it for.
A few weeks ago I was unsure of my PIN code because I got it wrong on the first try, the keypad somehow seemed different (I was getting cash, which I don't often do), and I just completely blanked. I got something from a store and paid by PIN there to make sure I got the right code, and then got my cash.
Does the analogy hold for ^M which is carriage return?
Anyway, I remember that stuff. Had a lot of "fun" on Unixes back in the day using things like ^J, ^M, ^H, stty sane, stty -a, stty icrnl, stty onlcr (or is it the other way around), fiddling with termcap and terminfo, and much more ...
> The use of the HJKL keys for moving the cursor in the vi editor and its descendants originated from the ADM-3A [...] The ←, ↓, ↑, → and Home labels printed on the H, J, K, L, and ~ ^ keys were a visual reference to the control characters Ctrl+H, Ctrl+J, Ctrl+K, Ctrl+L, and Ctrl+~ ^ that were required to move the cursor left, down, up, right, and to the top/left corner (or "Home" position) of the terminal, respectively [...] The Ctrl+H and Ctrl+J functions were the standard ASCII backspace and line feed respectively, but the interpretations of Ctrl+K, Ctrl+L, and Ctrl+~ ^ were new to the ADM-3A.
Seems almost a happy accident. I personally like the placement because the most common movement in a document is down and it's placed right under the most dextrous finger, the index finger, by a coincidence between ASCII encoding and the QWERTY layout. Up being the second most common movement was put under the second most dextrous finger. Nice.
Yeah, I think you'd have the same issue trying to teach people to play guitar over the lunch hour. It takes a lot of practice to learn vim but it's super rewarding once you do!
As a side note: "Lunch and learn" is work for me. I have a strikt rule, that whenever someone talks heavily about work at lunch, I consider it a meeting - just as "lunch and work". Therefore I will take a work break afterwards.
I know exactly what you mean. At work people constantly ask me what keys do what and the moment they do my mind goes completely blank. To the point that I even forgot how to use vim for a short while until the conscious part of my brain is preoccupied with something else and suddenly I can use vim again.
I think all quick learning session of vim invariably turns into bootcamp style "learning to code". Jumps straight into what but not how and why.
To know what modal editing is and understand that first is going to help - but then your learning session is over like that without teaching any "tricks".
You can get vim simulators in most editors too. Even Emacs. The interesting question becomes whether you still prefer VIM as an editor. One advantage is you can use the same editor over SSH. If it is not there it is quick to install.
The issue with Vim for me is that it takes years for the keybinds to be picked up as muscle memory. Learning takes effort, people can’t learn everything. And there’s an endless amount of things I can learn other than Vim that will give me a more fulfilling life.
In my case, it only took a few months to be more effective with Vim than without it. Since I spend most of my time working, Vim is a great improvement to my quality of life. The benefits of Vim include not just productivity, but also comfort.
It's just so unintuitive and trying to teach it in a "here are some good shortcuts that will save you time" way was a near-total waste.
vim is the closest any editor comes to interfacing directly with my brain. Once you learn to make your neurons fire in the right way to move the cursor to the right spot, it's easy and there's no better way to edit code. Describing the neuron firing order to someone else, though, is futile.
It's like learning to to use your fingers to pick something up for the first time as a kid: you just have to try enough times until it sticks.