tags:

views:

118

answers:

2

I'm looking for a VIM plugin that can do these kind of thing. Let's say I have a function in a .cpp file

void myFunction(int arg1, int arg2, int arg3){
  //code 
}

The function definition is defined in the .h file. So every time I change the function name or add a new argument to the function, I have to go back the the .h file to do the same.

Is there a VIM plugin that can automate this task?

A: 

I don't know, but usually I use a regular expression: open both files in tabs or in splits, and when you need to modify the function just produce a regex which will be applied on both buffers. Easy peasy!

Dacav
A: 

It sounds to me like you are looking for a C++ refactoring tool. A quick search for 'refactor' on vim.org brought up one script specifically meant for C/C++ but it doesn't have a very high rating.

Randy Morris