Ⅰ. 插件描述
rename variables and files in your codeⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/rename-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/rename-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/rename-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/rename.vim
Ⅳ. 文档说明
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'