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

How do you use the expression register to insert a calculation?

Answer

<C-r>=42*7<CR>

Explanation

In insert mode, press <C-r>= to access the expression register, type a math expression like 42*7, and press Enter to insert the result (294).

Next

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