Ⅰ. 插件描述
Yet, just another code fold plugin for vim.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'mikecoder/code-fold-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'mikecoder/code-fold-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'mikecoder/code-fold-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/mikecoder/code-fold.vim
Ⅳ. 文档说明
code-fold.vim
Yet, just another code fold plugin for vim.
Feature
Different views for the same file in different git branches- Save the fold you make when you leave vim.
- Auto load the view when you open the vim.
- Easy to install.
Installation
- Install Vundle.
- Add
Plugin 'MikeCoder/code-fold.vim'to your vimrc. - Launch vim and run :PluginInstall.
How to use
- Use
vto select your selection. - The use
<leader>zzorffto fold the code. - If you want to unfold the code, just need to use
ffor<leader>zzagain.
Key Bindings
Using <leader>+zz and ff as default keybindings. If you want to change it to your custom keybindings.
Just add map {Your keybindings} @=((foldclosed(line('.')) < 0) ? 'zf' : 'zd')<CR> to your vimrc file.
Tips
- It need the ~/.vim/view folder, so you should create the folder manually if the plugin inits failed.
- If you want to clean your previous view files, you can remove the files under ~/.vim/view folder.
- If your code-flod.vim plugin not work, you can logout from you system and login again, if the problem not clear, submit issue with the result of vim --version.
Video

TroubleShooting
Submit issue please.
License
See License
TODO
See Todo