Last active
September 4, 2025 05:56
-
-
Save Integralist/8d01300efcd2006c69e8b9492c0eada8 to your computer and use it in GitHub Desktop.
Vim: search and replace content using native vim cdo and cfdo commands #vim #replace #macro #quickfix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :cfdo execute "norm @q" | update |
π
Thanks!
Just mind that if you want to really change all instances (in case there's many in a line) you might need a /g flag (depending on gdefault option). So run: :cfdo %s/foo/bar/g
2025 and still the best explanation! π
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome notes π Now I understand the difference between cdo and cfdo.
Thank you