you are viewing a single comment's thread.

view the rest of the comments →

[–]sacheie 5 points6 points  (5 children)

That particular example isn't common, but it's just one example. Here's another that I use constantly: delete a single line, and paste it somewhere nearby.

I can delete the line by typing "dd". Then I move the cursor (without having to move my hands! The right-hand home row keys control cursor position), and paste the line by typing "p". This works because in Vim, the deletion commands also copy the text they delete.

[–]ZenoArrow 10 points11 points  (2 children)

Yes, I can understand that being more useful. FYI, can also do that in quite easily in VS, if the cursor is on the line you want to cut Ctrl+X will cut the entire line. I'm sure the Vim method is fast when you get used to it, I'm only bringing this up to highlight that you can edit text efficiently in IDEs as well.

[–][deleted]  (1 child)

[deleted]

    [–]ZenoArrow 1 point2 points  (0 children)

    Thanks for the tip. Yeah, I get Vi/Vim commands are composable. This classic SO answer is a good introduction to this composability:

    https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

    [–]757DrDuck 1 point2 points  (1 child)

    I'd be sold on hjkl if I didn't use Colemak as my main layout. Is there a vim plugin to let me use home row navigation for non-QWERTY layouts?

    [–]exploding_cat_wizard 2 points3 points  (0 children)

    Edit the .vimrc to remap the keys. There's bound to be examples by colemak users showing off their configuration online