Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'arecarn/clean-fold-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'arecarn/clean-fold-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'arecarn/clean-fold-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/arecarn/clean-fold.vim
Ⅳ. 文档说明
clean-fold
clean-fold provides alternatives to the default foldtext cleans up the
appearance of folds. This plugin also provides a new fold expression that is
an alternative to the built-in indent method of folding, that includes the
line before the indent as well as the following indented lines.
Fold Text Style
Alternatives to the default foldtext and a new foldmethod
clean_fold#fold_text(foldchar)- cleaner alternative to default fold text, still including number of folded lines
set foldtext=clean_fold#fold_text('_')clean_fold#fold_text_minimal()just include the text on the line except fold markers
set foldtext=clean_fold#fold_text_minimal()
Fold Expression
A new foldexpr set up so lines that are at the same indented level are
folded along with the first line above them one indent level up.
clean_fold#fold_expr(lnum)like indent folding but also include first line that is one indent level lower
set foldmethod=expr set foldexpr=clean_fold#fold_expr(v:lnum)