Ⅰ. 插件描述
Switch from *.c* to *.h* and vice versaⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ericcurtin/curtineincsw-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ericcurtin/curtineincsw-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ericcurtin/curtineincsw-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ericcurtin/curtineincsw.vim
Ⅳ. 文档说明
# CurtineIncSw.vim
Easily toggle between *.c* and *.h* buffers.
Description
Some assumptions:
- The filenames of the header and body (implementation) are identical
for the extension or the directory.
- That is,
foo.c->foo.his supported, - whereas
foo.c->bar.his not supported.
- That is,
- The user opens files from the base of the repository. Or the other file is
somewhere within the directory of the file you are opening or it's
subdirectories.
- The repository contains both the header and body (implementation) files.
Based on these assumptions, you should not need to reconfigure when you switch
between repositories.
Installation
Copy CurtineIncSw.vim into your ~/.vim/plugin directory.
Or :source CurtineIncSw.vim to load it into your running session.
You can set a keyboard shortcut if you want by placing something like:
map <F5> :call CurtineIncSw()<CR>in your ~/.vimrc file. Yes, the <CR> is literally there at the end
as the four characters shown.
Installing with Vundle
Add Plugin 'ericcurtin/CurtineIncSw.vim' to your your plugin definitions
in your .vimrc