This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/search-and-replace-with-laila-winner
Most of the time I 'm having to search and replace across multiple files. or do a search and replace across the project that I am working on. Any recommendations for that ?
@PeytonF18, if you want to do a big search and replace in Vim, the greplace.vim plugin is a great option that lets you visually verify what youâre changing. Thereâs a clip of @jferris from thoughtbot using it around 8:28 in this Weekly Iteration.
Drew Neil at Vimcasts also has a screencast about using the argument list :argdo
to edit multiple files in a single operation. I have never been comfortable enough to do this without needing to look up how to do it, but itâs built in to Vim and doesnât require any plugins to use.
Our dotfiles also contain a replace
script that you can use from the command line to replace strings in multiple files.
argdo seems to take more effort . Sticking with greplace.vim thanks for the suggestions. Much appreciated!