Skip to content
/ vim-cdo Public

Vim commands to run a command over every entry in the quickfix list (:Cdo) or location list (:Ldo).

Notifications You must be signed in to change notification settings

Peeja/vim-cdo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

The Cdo plugin is now deprecated. Vim 8 adds almost identical native :cdo and :ldo commands, with additional functionality.


Cdo

Example: Find every instance of foo in the working directory and replace it with bar.

:grep foo
:Cdo s/foo/bar/c | update

Commands

:Cdo [command]

    Runs the same command over every entry in the quickfix list.

:Ldo [command]

    Runs the same command over every entry in the location list.

:Cdo/c [command]

    Just like |:Cdo|, but asks for confirmation before changing each file.

:Ldo/c [command]

    Just like |:Ldo|, but asks for confirmation before changing each file.

Setup

In order for :Cdo to function, you must add the following line to your .vimrc file:

set hidden

Set hidden allows the buffers to stay open while :Cdo makes changes to each file in the list.

Credits

Cdo was written by Peter Jaros (@peeja), with contributions from Danielle Sucher (@DanielleSucher).

About

Vim commands to run a command over every entry in the quickfix list (:Cdo) or location list (:Ldo).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •