1

I was wondering if there's a way to allow a buffer to edit multiple files at once.

Recently, I got vim working with eclim. But now I was wondering if I could edit multiple files at once in one buffer. For example, say I have an interface and a class file where I need to update a method signature is there a way I can load both of them into the same buffer and edit them simultaneously. Narrow region for multiple file regions. It would also be awesome to remember my settings but that could be a future iteration.

I saw this solution but it seems inconvenient to create a separate file to handle this interaction.

Community
  • 1
  • 1
prafulfillment
  • 911
  • 2
  • 11
  • 26
  • What's wrong with having the interface and class file open in two buffers, using two vim windows both on the screen at once? – Benj Jan 06 '12 at 16:59
  • Sometimes it's more than two files and it's more convenient to look at all the editable regions at once. If you've ever used MyBatis or any similar Java lib you start to see 5 - 6 files where similar changes need to be reflected and scripting the process is tedious. – prafulfillment Jan 06 '12 at 18:26

1 Answers1

1

You can open all files as split windows (so you see all of them together), and :windo, :bufdo, :argdo allow you to perform mass-operations (like a :substitute) on all of them at once. There's usually no need for such artificial concatenation schemes, and as the linked article shows, it has its downsides over keeping the files separate.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324