On 27/09/09 09:51, stone wrote:
>
>
> 2009/9/27 <[email protected] <mailto:[email protected]>>
>
>
> > When working under UNIX/Linux:
> > cd <directory with files>
> > sed -i 's/<old symbol>/<new symbol>/g' *
>
> > When working under Windows:
> > I feel sorry, but...
>
> Okey, Thank you.
> In windows, I can also use sed tools.
>
> But I feel inconvenience that I can not do it under vim.
>
> Anyway, thank you again.
Oh, but you can (provided of course that you can tell Vim how to find
the files and how to find the symbols). Here is an example:
:args ./**/*.html
:argdo %s/\<ape\>/monkey/g |update
The :update command (within the argdo) writes the file if modified, so
you won't have an error for trying to |abandon| a modified file.
Alternately, you could set 'autowriteall'. 'hidden' I don't recommend in
this case, because all your 'modified' buffers (even those not displayed
in a window), would then be kept in memory, with a higher risk of memory
exhaustion.
Of course, if there are many directories and files to scan, the command
may take quite some time, but I expect it to work except for very many
very large files (see ":help limits").
Best regards,
Tony.
--
"Well, that was a piece of cake, eh K-9?"
"Piece of cake, Master? Radial slice of baked confection ...
coefficient of relevance to Key of Time: zero."
-- Dr. Who
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---