Live data from Hacker News

Learn Vim (the Smart Way): a book to learn the good parts of Vim

github.com

11–20 of 134 posts

Re: Learn Vim (the Smart Way): a book to learn the good parts of Vim

#11

Two things that helped me more than anything with "learning" vim and or ever wanting to use it: 1. Remap your "capslock" key to "escape." Vi was written using an ADM-3A terminal and its keyboard, which you can see here: https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys has the escape-key in a sane place. On modern keyboards, if you can, remap "capslock" to "escape" when pressed alone, and "ctrl" when pressed with…

About 1., you can simply use ctrl-] as an alternative Escape command.

Re: Learn Vim (the Smart Way): a book to learn the good parts of Vim

#12

Two things that helped me more than anything with "learning" vim and or ever wanting to use it: 1. Remap your "capslock" key to "escape." Vi was written using an ADM-3A terminal and its keyboard, which you can see here: https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys has the escape-key in a sane place. On modern keyboards, if you can, remap "capslock" to "escape" when pressed alone, and "ctrl" when pressed with…

When I was first learning Vim I remapped caps lock to escape, and it was a huge improvement. But as I became more comfortable in Vim I realized I was using the control key a lot.

I've since remapped caps lock to control, and use ctrl-[ as escape (this is default behavior). I find having an easily accesible control key is very useful, even outside Vim. You can see in your link that it is actually the control key that used to be in the position we now put the caps lock key.

It does seem like remapping caps lock to escape when pressed alone and control when pressed with another key would be nice, but that wasn't an option for me (on wayland) as far as I know.

I bring this up only because there was a week or two transition period when I made this change, and I probably would have been better off if I had mapped caps lock to control from the start.

Re: Learn Vim (the Smart Way): a book to learn the good parts of Vim

#13
In my opinion, the greatest benefit of using Vim, Emacs or even Acme is how easy it is to create custom tools for your problem at hand, even for one-shot tasks. VSCode is very capable, but it can't compete in this regard (and maybe that's what they want and maybe it's a good call as well).

Re: Learn Vim (the Smart Way): a book to learn the good parts of Vim

#15

Two things that helped me more than anything with "learning" vim and or ever wanting to use it: 1. Remap your "capslock" key to "escape." Vi was written using an ADM-3A terminal and its keyboard, which you can see here: https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys has the escape-key in a sane place. On modern keyboards, if you can, remap "capslock" to "escape" when pressed alone, and "ctrl" when pressed with…

I'm personally a fan of remapping jk or jj to esc, there barely any instances in the english language where you would use those two letters together, and it means you can leave insert mode whilst barely moving your hands :D

Re: Learn Vim (the Smart Way): a book to learn the good parts of Vim

#16
post #5

FZF(and its vim plugins) really leveled up the game for Vim.

I 100% agree with this. Using fzf.vim for finding/opening files, searching across files, searching within a file, etc had a definite positive impact on my productivity. For reference, I was previously using netrw.

fzf is also really useful outside of Vim. I like to use it to fuzzy find git branches among other things.

Re: Learn Vim (the Smart Way): a book to learn the good parts of Vim

#17
I started Vim when the internet went out once and, bored, I finally tried `vimtutor` on the debian command line.

It just opens vim to a txt file that incrementally explains how to make basic edits. I was instantly hooked when I realized how much time "o" and "O" alone would save me over.

I almost never use Vim these days because I was too lazy to port my .vimrc + Vundle plugins to a new laptop at some point, but I use a Vim-mode in every editor I use, even the browser.

Re: Learn Vim (the Smart Way): a book to learn the good parts of Vim

#18
post #13

In my opinion, the greatest benefit of using Vim, Emacs or even Acme is how easy it is to create custom tools for your problem at hand, even for one-shot tasks. VSCode is very capable, but it can't compete in this regard (and maybe that's what they want and maybe it's a good call as well).

I've tried using the vim plugin for VSCode many times, and every time I come back to it, it just feels... off? The actual vim keybindings work fine when you're editing the document, but I find that when you want to use some of the other features of the editor, it becomes a bit more tricky/hacky.

If MS made an official set of vim keybindings that had better editor support, or even if there was some sort of kill switch that let me turn off vim key bindings quickly, I would be 100% sold on VSCode, but until then, I'll stick to the terminal.

Re: Learn Vim (the Smart Way): a book to learn the good parts of Vim

#20
post #3

Ah Vim, one of the root causes of my imposter syndrome. (The others are CSS Grid, and Kubernetes)

Kubernetes very easy to use, worth learning imho. One hour's worth effort yields great advantage for work.

Vim not worth learning to use as adult. Time too valuable. Takes too long to become extension of body. Best learned as child/teenager. Time worthless then. Maybe if you can learn it fast. Took me years of teenage to get unthinking proficiency.

Post reply on HN