Hacker News new | past | comments | ask | show | jobs | submit login

I don't know why, probably terrible memory, but I have practically a mental block when it comes to keyboard shortcuts. I've tried spacevim and a few other bundled vims before but I have such a hard time doing anything other than moving the cursor and :wq! type of stuff.

Like.. this is wild https://vim.rtorr.com/

And now I'm hooked on a horrible amount of vscode plugins.




You can still use VSCode and just use the Vim plugin.

Vim is not an editor, it's a language you speak with your editor. Like with real language learning, some of it is just rote memorization.

There are, however, some tricks that I find really help. The first is to find mnemonics for the different actions. Some are obvious, for example (d)elete or (c)hange. Some require a little imagination, like un(t)il (like in 'til).

Finally, there's some level of logic to many related things. For example, the CAPITAL version of an action is generally a "louder" more aggressive/stronger version. So (a)ppend is just "insert after current cursor position", whereas (A)PPEND! means "insert at the very end of this line".

Just like with languages, if you use them long enough, they start to "make sense", and "feel right". I don't have to translate "I want to append at the end of the line" to the correct keybinding, I simply "speak" to the editor in a way that "feels" right.


you can do it. you have to want to, first, though.

then you sit down for an hour and you create and edit a file, and you do not allow yourself to hold any key down to move the cursor around. you have the link you posted printed out, and you use only what is on the sheet to edit.

when you want to add something to the end of the line, you do NOT push the END key then enter edit mode, you look at the sheet and you find what you want and you push SHIFT+A to enter edit mode and go to the end of the line at the same time.

you keep track of which mode you're in and what mode you need to do something, and you force yourself through the keystrokes needed to operate completely and efficiently using only the keyboard.

in an hour, if you force yourself to use only the shortcuts on the cheat sheet, you will be more fluent in vi/vim than ~90% of the people who use it, myself included, and I've been using vi/vim for 25 years.


You might like x!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: