October 2012
346 pages
7h 40m
English
| Tip 15 | Paste from a Register Without Leaving Insert Mode |
Vim’s yank and put operations are usually executed from Normal mode, but sometimes we might want to paste text into the document without leaving Insert mode.
Here’s an unfinished excerpt of text:
| insert_mode/practical-vim.txt | |
| | Practical Vim, by Drew Neil |
| | Read Drew Neil's |
We want to complete the last line by inserting the title of this book. Since that text is already present at the start of the first line, we’ll yank it into a register and then append the text at the end of the next line in Insert mode:
| Keystrokes | Buffer Contents | ||||
|---|---|---|---|---|---|
yt, |
| ||||
jA |
Read now
Unlock full access