Live data from Hacker News

Vim – Minimal Setup Explained

guckes.net

111–114 of 114 posts

Re: Vim – Minimal Setup Explained

#112
post #108

Earlier quoted context omitted.

I sort of agree. When I was first getting into Vim, reading a couple of well documented vimrcs really helped me out.

I also agree in theory, but Ben McCormick's ~/.vimrc is tiny and is easy to understand for newbies, so I'm OK with it. But yes, adopting the rule that you should never put anything in your ~/.vimrc that you don't understand from building it up over time and usage is a good one.

I definitely get how looking at someone else's vimrc could be considered interesting but someone else's config is an expression of their own circumstances, that are very likely to be different from yours. Yes, picking up something that makes sense for you and that you understand _can_ be a win, but a) it doesn't replace actual learning, and b) using someone else's vimrc wholesale is not. All you get is a damn black box that you don't understand better than Vim itself… and yet more commands to learn. That's a losing strategy.

As for Ben McCormick's vimrc…

- line 18 is useless and its comment is misleading

- line 30 is a matter of taste so it has nothing to do in that context

- the comment for line 33 is wrong and shows how much the author cares about "new vim users" and how much he knows about the subject

Building one's vimrc from scratch is an integral part of the learning so shortcuts are to be avoided.

Re: Vim – Minimal Setup Explained

#113

Earlier quoted context omitted.

The easiest are F and J, the home keys where your index fingers rest. The more you have to "reach away", the harder it is to always correctly reset your hand.

well, we can’t really have F be a special key to return to normal mode

I'm not advocating for that! Just that Esc/Mode shouldn't be far. Vim uses Esc for mode switching because the author wrote vim on a keyboard that had Esc where now Capslock is on a modern keyboard.

Re: Vim – Minimal Setup Explained

#114
post #52
post #28

Earlier quoted context omitted.

It's because your computer can't tell the difference. c-[ and ESC send the same key-code. Same with c-i and tab. What you can do to get around this is to remap one of them to something like f20 using Karabiner, then map f20 to what you like in vim.

Thanks. Not sure if Karabiner is available for Linux, but I found https://stackoverflow.com/questions/41364833/karabiner-for-l... which might help me.

Can recommend interception-tools mentioned in that SO link. I have been using them for quite a while, remapping caps to escape in desktop environment agnostic way.
Post reply on HN