Vim Quickfix List

The Quickfix feature in Vim is a navigation component which stores a list of files and specific locations within those files. Most project search commands such as my setup for Piping RipGrep into FZF, will populate their results into the Quickfix list.

Mass Editing

The cfdo command can be used to run a command on every entry of the quickfix list.

For example:

find & replace on all files

:cfdo %s/find/replace/ge | w

run a normal command on all files

Here we run a normal command (the q macro). Note that execute is used so that the command can be quoted, otherwise | w would also be executed in normal mode.

:cfdo execute "normal @q" | w

Notes mentioning this note