refactor


Ⅰ. 插件描述

C/C++ refactoring tool

Ⅱ. 基本信息

创建日期:  2007-12-03
使用用户:  3
Github星:  5
插件作者:  bi dongliang

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/refactor'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/refactor'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/refactor'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/refactor

Ⅳ. 文档说明

This plugin contains some basic refactoring commands for C/C++.
For the complexity of C++, instead of really parse the source code, I used
regular expression matches. But it works well as I tested.

NOTE: It doesn't work for old style parameter declaratoins! And I admit that it may mess up your code sometime if you occasionally forget the rules. Thanks for the kind man who point out this.

The refactor commands and their default key map currently are:

1. <A-r>e     Extract method
2. <A-r>p     local variable to Parameter
3. <A-r>r      Rename local variable
4. <A-r>d     Delete parameter
5. <A-r>o     reOrder parameters
6. <A-r>c     introduce Constant

BiDongliang bidongliang_2000@126.com 2007/12/4

添加新评论