Need the result of a quick sum in the middle of a sentence? Vim has a calculator one key combination away, without leaving insert mode.
Ctrl-r =19*23<Enter>
In insert mode, Ctrl-r inserts the contents of a register. The = register is special: Vim asks for an expression at the bottom of the screen, works it out and inserts the result. So this types 437 right at the cursor.
The expression is Vim script, so more than arithmetic works:
Ctrl-r =strftime('%Y-%m-%d')<Enter>
Ctrl-r =printf('%.2f', 10.0/3)<Enter>
The first inserts today’s date, the second 3.33. I find the date one handy in notes.
Other registers work with Ctrl-r too, which saves a trip to normal mode. Ctrl-r " pastes what you last yanked or deleted, Ctrl-r / the last search pattern, and Ctrl-r 0 the last yank.
Watch out with whole numbers: 7/2 gives 3, because both sides are integers and Vim does integer division. Write 7.0/2 for 3.5.
Further reading: Vim help: i_CTRL-R_=, Vim help: expression register
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more