Ⅰ. 插件描述
plugin helping to find the branching path to current line of codeⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/vim-branch-stack-may-fear-less'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/vim-branch-stack-may-fear-less'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/vim-branch-stack-may-fear-less'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone
Ⅳ. 文档说明
vim-branch-stack
vim-branch-stack is a Vim plugin helping to find the branching path to current line of code.
Introduction
vim-branch-stack
plugin is intended to help working on legacy C/C++ code where
functions are long and have many nested branches (if-else
, switch-case
,try-catch
, while
, for
).
Usage
The stack is shown in the location window after BranchStack
command
execuiton while cursor is placed on the target line.
Example
main.cpp
int main ()
{
const int meaning = 42;
const int pi_floor = 3;
if (meaning)
{
if (pi_floor == 4)
{
// Do the stuff
}
else
{
// Cursor is here
}
}
return 0;
}
Location window
1 main.cpp |6| if (meaning)
2 main.cpp |12| + else
Limitations
The plugin has the following limitations:
* Commented out code is not supported
* goto
is not supported
* do-while
is not supported
* Preprocessing is not supported
Contribution
Source code and issues are hosted on GitHub:
https://github.com/aserebryakov/vim-branch-stack