Vim command modifiers
1 min readNov 5, 2017
Vim has commands that modify the behaviour of other commands. I don’t know whether an exhaustive list exists. Here are a few that I know of (excluding autocommands):
:global and :vglobal
These are well known. They execute a command for all matching and non-matching lines in a buffer, respectively.
do-commands
They execute the command multiple times in different contexts.
- :argdo
- :windo
- :bufdo
- :tabdo
- :cdo
- :ldo
- :folddoopen
- :folddoclosed
window opening commands
They let you control the position in which a new window will pop up.
- :vertical
There are also commands like :vnew and :vsplit. - :leftabove
- :aboveleft
- :rightbelow
- :belowright
- :topleft
- :botright
tab opening commands
- :tab Makes commands that would open windows open tabs instead.
Useful with :tab all
keep- commands
They prevent a command from modifying some part of Vim’s bookkeeping state.
- :keeppatterns
- :keepjumps
- :locmarks
- :keepmarks
- :keepalt
interface commands
- :silent
It doesn’t affect :redir - :unsilent
- :verbose
- :filter
Filters the output of another command. Do not confuse with :!. - :confirm
- :browse
Useful with :browse oldfiles
other commands
- :noswapfile
- :hide
Can be used with a command. - :debug