FastFold : Speed up Vim by updating folds only when called-for
script karma |
Rating 28/10,
Downloaded by 3663 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Enno Nagel |
|
script type |
utility |
|
description |
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.
|
|
install details |
Unzip FastFold.zip into ~/.vim on Linux or %USERPROFILE%\vimfiles on Windows. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.239.76.211
|