Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 753 Bytes

tip61.md

File metadata and controls

18 lines (12 loc) · 753 Bytes

Tip61: Replace a Visual Selection with a Register

tip61_1

When we use the p command in Visual mode, Vim replace the selection with the contents of the specified register.

tip61_2

Swap Two Words tip61_3

de to cut the word "chips", copying it into the unnamed register. Then we visually select the word fish, which we want to replace. p put the word "chips" into the document, and the word "fish" is copied into the unnamed register. Then we snap back to the gap and paste the word "fish" from the unnamed register back into the document.

Note: m{char}command sets a mark, and the `{char} command jumps to the mark.