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

55235Re: Multiple file find and replace

Expand Messages
  • Steve Hall
    Dec 2, 2004
    • 0 Attachment
      On Thu, 2004-12-02 at 10:30 +0000, Adam Cripps wrote:
      > I have a friend who uses Textpad and likes the multiple file search
      > and replace. I want to demonstrate this in Vim, but am unsure how to
      > do this.

      Cream has a vimscript that will find files matched with a wildcard,
      open each in turn, perform the substitution and close it again:

      http://cvs.sourceforge.net/viewcvs.py/cream/cream/cream-
      replacemulti.vim?view=markup

      Doing all this via script is slow (1/2 second per file), the dialog is
      worse than hackish. and it depends on a number of external Cream
      functions. But it is cross-platform (Windows and GNU/Linux). If a real
      grep ever finds it's way into Vim, this could all be sped up by
      limiting the files opened to those pre-determined to contain the match
      in the first place, too.

      However, sed -i is currently a better friend. ;)

      HTH.

      --
      Steve Hall [ digitect mindspring com ]
    • Show all 9 messages in this topic