User Tools

Site Tools


blog:vim_replace_in_multiple_files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blog:vim_replace_in_multiple_files [2011-01-04 15:39] – created brbblog:vim_replace_in_multiple_files [2011-01-04 15:53] (current) brb
Line 1: Line 1:
 ====== vim replace in multiple files ====== ====== vim replace in multiple files ======
  
-<quote>+<code>
  vim *.cpp Start Vim, defining the argument list to  vim *.cpp Start Vim, defining the argument list to
  contain all the C++ files.  You are now in the  contain all the C++ files.  You are now in the
  first file.  first file.
  qq Start recording into the q register  qq Start recording into the q register
- :%s/\<GetResp\>/GetAnswer/g+ :%s/\<GetResp\>/GetAnswer/ge
  Do the replacements in the first file.  Do the replacements in the first file.
  :wnext Write this file and move to the next one.  :wnext Write this file and move to the next one.
Line 14: Line 14:
  that this doesn't produce an error message.  that this doesn't produce an error message.
  999@q Execute the q register on the remaining files.   999@q Execute the q register on the remaining files. 
-<quote>+</code>
  
  
blog/vim_replace_in_multiple_files.1294151940.txt.gz · Last modified: 2011-01-04 15:39 by brb