Notes on building cloud software and systems for humans

Two Vim Tips I Hope to Actually Remember This Time

Read from an external command into the current buffer

:read prints the results of an external command into the current buffer.

Example

:read ! cat /etc/passwd will copy the /etc/passwd file into the current buffer.

Pasting yanked text into the command input

Yank a word (e.g. yw to yank the word under the cursor) Enter the vim command line via : Ctrl-R, " to paste from the default register.

Note to self - read up on vim registers again!