0

I need to replace a certain word across multiple files in vim, I've found that I'm able to do it if I open each file in a buffer, but when trying to open all of the files that need replacing vim declares that there are "too many file names". There's a plugin that enables what I need, but I was wondering if there's a solution that I'm unaware of that doesn't require a plugin.

1 Answer 1

2

You can always write your own script. Here is what I would do:

argadd file1
argadd file2
argadd file3 
argdo s/old/new/g

You need a new vim session for this though.

1
  • :argadd can handle multiple filename arguments, so you could do :argadd file1 file2 file3
    – Heptite
    Sep 21, 2012 at 3:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .