:set autowrite :args **/*.txt :argdo s/from/to/g I think will do what you wish; if not exact syntax (I typed it from memory), it's close and should help you find the right thing to do in the help files. :) This is going to be quite a bit slower than using a special-built tool (like sed on the commandline, I'm not sure if it's there on os x) since vim is going to open a buffer for each file and that has overhead.
On Sat, Nov 20, 2010 at 12:58 PM, DK <[email protected]> wrote: > Hi all, I am new to the group... Been trying out Macvim and I think I > have covered most of what I used in other editors except for how to > handle global searches and replaces for text in files (i.e. not > looking for file names, but search and replace text within all files > below a specific directory). > > Can anyone give me some advice on what they use for such tasks? I have > been poking around and see :grep as the main method, although not sure > if I can use it to do a replace? If you can give me a few examples > specific to MacVim that would be great. > > Thanks, > > David > > -- > You received this message from the "vim_mac" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > -- You received this message from the "vim_mac" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
