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

How do you use a macro to title-case each word on a line?

Answer

qagUlwq

Explanation

Record a macro that uppercases the first letter of the current word with gUl, then moves to the next word with w. Repeat to title-case all words.

Next

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