David Kearns Central RSS 2.0
# Wednesday, July 05, 2006

Example:
:args *.[ch]
:argdo %s/\<my_foo\>/My_Foo/ge | update
This changes the word "my_foo" to "My_Foo" in all *.c and *.h files.  The "e"
flag is used for the ":substitute" command to avoid an error for files where
"my_foo" isn't used.  ":update" writes the file only if changes were made.

[ Vim documentation: editing ]

This one item is the timesaver that is my "killer app" for using vim above all other editors. If you combine this with searching in windows for all *.html files (or some such) and then right-click and "edit in single vim" you can set up the args to be all the files in a webroot or somesuch. Perhaps for changing links everywhere.

Wednesday, July 05, 2006 11:25:41 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] -
admin | www
Comments are closed.
Archive
<July 2006>
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions.

© Copyright 2010
David Kearns
Sign In
Statistics
Total Posts: 1300
This Year: 1
This Month: 0
This Week: 0
Comments: 1761
Themes
Pick a theme:
All Content © 2010, David Kearns
DasBlog theme 'Business' created by Christoph De Baene (delarou)