Live data from Hacker News

Vim: revisited

mislav.uniqpath.com

61–70 of 117 posts

Re: Vim: revisited

#61
For me, switching to vim means moving my hand to use the mouse less often, which means less stress on my wrist. Of course, if you're typing on the keyboard all day, you still have some risk for RSI, but I find using the keyboard to be much more comfortable than using the mouse.

Plus it's much more productive!

Re: Vim: revisited

#62

If only I had read this when I first started using Vim! I've been using Vim for a while, and this is one of the best-organized overviews of Vim I've seen, partly because he doesn't try to enumerate every single key combination (which is the wrong way to learn Vim - the right way is to synthesize the way that the individual operations are logically combined, though that admittedly takes some time). The best two pieces…

I agree about accepting (most) standard key bindings, but here are two clever bindings I adopted: " Enter command mode with SPACE instead of : noremap : " Exit insert mode with jj (double J) instead of ESC imap jj

What about changing hjkl movements to jkl;? I didn't try it yet... But hjkl bothers me. My index belongs on j, for homerow touch typing, not h. Wouldn't it be an improvement? Not having to move the hand for movements. I must be missing something because everyone stays with hjkl.

Re: Vim: revisited

#63

Earlier quoted context omitted.

I agree about accepting (most) standard key bindings, but here are two clever bindings I adopted: " Enter command mode with SPACE instead of : noremap : " Exit insert mode with jj (double J) instead of ESC imap jj

I used jj for a while as well, but once I found out that ctrl-C did the same thing out of the box, that became my "esc" key> (it's also important to remap caps lock to control, on the mac its easy: System Preferences->Keyboard->Keyboard->Modifier Keys)

As graywh says, ctrl-c is not the exact same as escape. If you want something standard which is, try ctrl-[. Harder to type, I know.

Re: Vim: revisited

#64
post #62

Earlier quoted context omitted.

I agree about accepting (most) standard key bindings, but here are two clever bindings I adopted: " Enter command mode with SPACE instead of : noremap : " Exit insert mode with jj (double J) instead of ESC imap jj

What about changing hjkl movements to jkl;? I didn't try it yet... But hjkl bothers me. My index belongs on j, for homerow touch typing, not h. Wouldn't it be an improvement? Not having to move the hand for movements. I must be missing something because everyone stays with hjkl.

The keys I use most are up/down. I tend to move between lines more often than I move between characters. This is true in any editor, but especially in vim, since I almost never move between individual characters, but rather use [w]ord movement commands, or [f] commands, etc.

That's why it makes sense that my strongest fingers are on the up/down motions, whereas to move to the left, a movement I never make, is off to the side.

Also, I wouldn't remap it for practical reasons - hjkl is a standard implemented in many places.

Re: Vim: revisited

#65
post #41

set relativenumber I had been using Vim for years, and this is fundamentally one of the most useful settings I came across. I think it's only available it the latest rel. Funny side note, I was out on the town one night and saw a bunch of guys and girls hacking on their laptops... in a club. I noticed one guy using Vim, came up behind him and told him he has a good taste in editors. It turns out he's Jay Freeman (sau…

If you ever run into him again, buy him a beer please for Cydia.

Re: Vim: revisited

#66
"vim has two main modes, normal mode ... and the insert mode"

i stopped reading here because i knew what was coming next. the omen was fulfilled by the next line:

"in insert mode, now you type text as your normally would. Pressing exits back to normal mode."

its command mode vs insert mode. any vi user should know that.. it's the very first thing vi bludgeons you with.

Re: Vim: revisited

#67
post #62

Earlier quoted context omitted.

I agree about accepting (most) standard key bindings, but here are two clever bindings I adopted: " Enter command mode with SPACE instead of : noremap : " Exit insert mode with jj (double J) instead of ESC imap jj

What about changing hjkl movements to jkl;? I didn't try it yet... But hjkl bothers me. My index belongs on j, for homerow touch typing, not h. Wouldn't it be an improvement? Not having to move the hand for movements. I must be missing something because everyone stays with hjkl.

I'm much faster in vim since I gave up (for the most part) on hjkl (arrow keys are banned for obvious badness). / ? # * combined with f and t are so much faster. The only time I use j/k is 10j/10k for looking through files.

Hence, your question is somewhat misguided ;)

Re: Vim: revisited

#68
post #36

Earlier quoted context omitted.

I used jj for a while as well, but once I found out that ctrl-C did the same thing out of the box, that became my "esc" key> (it's also important to remap caps lock to control, on the mac its easy: System Preferences->Keyboard->Keyboard->Modifier Keys)

Note: that isn't exactly the same--using Esc will trigger InsertLeave autocommands, Ctrl-C will not.

imap

Now it does.

Re: Vim: revisited

#69

I pretty happy to have learned about and `. I always learn something from these 'how I learned vim' articles.

This is one of my favorites; until I learnt about b# (:b#) to 'toggle' to the last open buffer. Quickly remapped this to , (being ,,). Et voila: lightning-uber-fast-buffer-toggling.

Re: Vim: revisited

#70
post #47

Still can't decide if Vim is actually worth all this trouble, or if it's a cult.

When considering the 'classics'; it's either joining the cult of vim, or entering the church of emacs.

Both have pros and cons; both are in the same everlasting-holy-war and once in a while either will start a new crusade.

Post reply on HN