Hacker News new | ask | show | jobs
by nameless912 3173 days ago
One of my favorites: xp to exchange characters.

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.

1 comments

You can do the equivalent lines with:

    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.