Loading ...
Sorry, an error occurred while loading the content.

Re: keying, etc. (was: vi navigation -> :help navigation)

Expand Messages
  • Gerald Lai
    On Thu, 30 Mar 2006, Gene Kwiecinski wrote: [snip] ... [snip] sed & save functionality: vim -EsnXNbu NONE -i NONE + argdo %s/ / /ge|up!|bw + q
    Message 1 of 3 , Mar 30 2:06 PM
    • 0 Attachment
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.