vimtricks.wiki Concise Vim tricks, one at a time.

How do you yank lines between two marks into a register?

Answer

"a:'a,'by

Explanation

Set marks with ma and mb, then yank the range between them into register a using "a:'a,'by. Captures a specific section of the file.

Next

How do you yank a single word into a named register?