by levthedev · 9y ago · 0 comments
Also, most beginners use insert mode too much. If you find yourself going into insert mode just to change a letter or word, try learning shortcuts instead (r for replace, ciw for replace word, diw for delete word, and other neat command combinations).
Maybe I'm too lazy to memorize them, I don't know.
But using hjkl is still too weird for me, even after using vim for more than 6 months. :)
It's very natural to use j and k. When you touch type, "j" is your right index home base (I assume you know it but that's why there's a physical marker on "j" and "f").
x cuts the character under the cursor and p pastes it after the cursor. Net effect is exchanging the character on the cursor with the one to the right of the cursor.
ddp
dd deletes a line and p pastes the deleted line below the current line. Since your cursor ends up in the line after the line you just deleted, this ends up effectively exchanging the lines.