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

How do you record a macro to wrap a word in a function call?

Answer

qaciWmyFunc(<C-r>")<Esc>q

Explanation

Record a macro that changes the inner word, types the function name with opening paren, pastes the original word from the register, and closes the paren.

Next

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