sponsor Vim development Vim logo Vim Book Ad

rename.vim : rename variables and files in your code

 script karma  Rating 11/4, Downloaded by 1216  Comments, bugs, improvements  Vim wiki

created by
Christophe-Marie Duquesne
 
script type
utility
 
description
IMPORTANT:

It is recommended to use EasyGrep.vim rather than this script. The "replace" feature does nearly the same thing, and the implementation is much better.

==

This script is a fork of renamec.vim from Bastian Mathes

It features two functions:
:call Renamec() renames the variable under the cursor. Cscope is called to get the references to the corresponding C symbol.
:call Renamef() renames the file under the cursor. The references to this files (like #include"path/to/file") are updated.

- When renaming a variable or a file, the quickfix list is updated, so you can jump in the code to modified parts (for example to check if the comments need an update).
- The buffers where the modifications occured are not unloaded and changes are joined so that they can be canceled easily with ':bufdo undo'
 
install details
open the vimball archive with vim and source it with ':so %'
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
rename.vba 1.1 2010-03-26 7.0 Christophe-Marie Duquesne code cleanup
rename.vba 1.0 2010-03-25 7.2 Christophe-Marie Duquesne Initial upload
ip used for rating: 44.220.251.57

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github