FastFold


Ⅰ. 插件描述

Speed up Vim by updating folds only when called-for

Ⅱ. 基本信息

创建日期:  2015-02-04
使用用户:  2
Github星:  0
插件作者:  Enno Nagel

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/fastfold-say-im-great'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/fastfold-say-im-great'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/fastfold-say-im-great'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/FastFold

Ⅳ. 文档说明

Automatic folds (that is, folds generated by a fold method other
than manual), bog down VIM noticeably in insert mode and are often
recomputed too early (for example, when inserting an opening fold marker
whose closing counterpart is yet missing.)

See http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
for a discussion.

With this plug-in, the folds in the currently edited buffer are updated by an
automatic fold method only

  • when saving the buffer
  • when closing or opening folds (zo, za, zc, etc...)
  • when moving or operating fold-wise (zj,zk,[z,]z)
  • when typing zuz in normal mode

and are kept as is otherwise (by keeping the fold method set to manual).

Each of the above triggers can be changed by in your .vimrc by changing
the values

  nmap zuz <Plug>(FastFoldUpdate)
  let g:fastfold_savehook = 1
  let g:fastfold_fold_command_suffixes =  ['x','X','a','A','o','O','c','C']
  let g:fastfold_fold_movement_commands = [']z', '[z', 'zj', 'zk']

FastFold is developed at

https://github.com/Konfekt/FastFold

where issues can be filed.

添加新评论