code-fold.vim


Ⅰ. 插件描述

Yet, just another code fold plugin for vim.

Ⅱ. 基本信息

创建日期:  2016-11-14
使用用户:  1
Github星:  6
插件作者:  Mike

Ⅲ. 安装方法

使用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

GitHub version
Build Status

Yet, just another code fold plugin for vim.

Feature

  1. Different views for the same file in different git branches
  2. Save the fold you make when you leave vim.
  3. Auto load the view when you open the vim.
  4. Easy to install.

Installation

  1. Install Vundle.
  2. Add Plugin 'MikeCoder/code-fold.vim' to your vimrc.
  3. Launch vim and run :PluginInstall.

How to use

  1. Use v to select your selection.
  2. The use <leader>zz or ff to fold the code.
  3. If you want to unfold the code, just need to use ff or <leader>zz again.

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

  1. It need the ~/.vim/view folder, so you should create the folder manually if the plugin inits failed.
  2. If you want to clean your previous view files, you can remove the files under ~/.vim/view folder.
  3. 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

Video

TroubleShooting

Submit issue please.

License

See License

TODO

See Todo

添加新评论