2b6fa274a8
The 'foldmethod' was being reset every time the cursor entered a vimwiki, causing an unnecessary large delay. So it was changed to set it only the first time the buffer is loaded into a window. This greatly improves performance when switching between vim tabs. Fold settings are also reapplied after using 'diffoff'. Added test/ directory with sample file and instructions for testing this change. Fixes #580
19 lines
666 B
Plaintext
19 lines
666 B
Plaintext
" From https://github.com/vimwiki/vimwiki/pull/601
|
|
$ gvim -u NONE -U NONE -N -i NONE
|
|
<commands below can be copied to clipboard and run with `:@+`>
|
|
set nocompatible
|
|
filetype plugin on
|
|
syntax on
|
|
let g:vimwiki_camel_case = 0 " Don't make links from CamelCased words
|
|
let g:vimwiki_table_auto_fmt = 0 " Turn off table auto-formatting
|
|
let g:vimwiki_autowriteall = 0
|
|
let g:vimwiki_folding = 'expr:quick' " Enable folding.
|
|
let &rtp.=',~/.vim/bundle/vimwiki'
|
|
source ~/.vim/bundle/vimwiki/plugin/vimwiki.vim
|
|
e ~/tmp/delay.wiki
|
|
normal! 50%
|
|
normal! zozo
|
|
tabe
|
|
let start = reltime() | tabprev | redraw | echom reltimestr(reltime(start))
|
|
" >>> expected: less than 0.5 seconds
|