Re: keying, etc. (was: vi navigation -> :help navigation)
On Thu, 30 Mar 2006, Gene Kwiecinski wrote:
> Eg, I'd need to make global changes in a *lot* of files, just one simple
> change each. I imagine there's some way for 'vim' to automate the
> process without my having to load a few dozen files in as many
> directories, do a search, replace, ':n' my way to the next file (have
> 'autowrite' set, natch), etc., for over 100 files or so, but I haven't
> even imagined what functions to use. Knowing something *can* do A, B,
> or C, is a good start to being able to figure out uses for it.
sed & save functionality:
vim -EsnXNbu NONE -i NONE +"argdo %s/<search>/<replace>/ge|up!|bw" +"q" "*.ext"
This follows the general format:
vim -EsnXNbu NONE -i NONE +"argdo <cmd>|up!|bw" +"q" <files>
Hope this helps.