[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim
Subject:    Re: keying, etc. (was: vi navigation -> :help navigation)
From:       Gerald Lai <laige () eecs ! oregonstate ! edu>
Date:       2006-03-30 22:06:13
Message-ID: Pine.LNX.4.63.0603301400330.31291 () larsenbay ! eecs ! oregonstate ! edu
[Download RAW message or body]

On Thu, 30 Mar 2006, Gene Kwiecinski wrote:
[snip]
> 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.
[snip]

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.
--
Gerald

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic