Random tips and tricks based on my vim config
Find and replace in project
- Grep for the string:
:grep string_i_wanna_replace
- the grep will load the quickfix list with files containing the string
:cdo %s/string_i_wanna_replace/new_string/g | update
Refer:
- Vimcast: Project-wide find and replace
- Ref: Vim’s new
:cdo
command