In Vim, you can exist Insert mode to enter one command using Ctrl–O,
for example: (in insert) Ctrl–O, type :w
, then ↵ Enter, then back to writing.
Tag: vim
To quickly in-/decrement number under cursor in Vim, use (in Normal):
- to increment: Ctrl–A
- to decrement: Ctrl–X
In Normal mode, use ~ to switch case of letter under cursor. Similar commands are:
gU<i></i>
– to switch to upper-casegu<i></i>
– to switch to lower-case
For example: gUU
converts whole line to upper-case and guiw
to convert word surrounder by cursor to lower-case.