diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 0755884..7c69a8b 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -215,7 +215,6 @@ fu! s:opts() "{{{2 cal extend(s:prtmaps, s:urprtmaps) en endf -cal s:opts() "}}}1 " * Open & Close {{{1 fu! s:Open() @@ -1653,9 +1652,9 @@ fu! s:mmode() endf " Cache {{{2 fu! s:writecache(cache_file) - if ( g:ctrlp_newcache || !filereadable(a:cache_file) ) && s:caching - \ || len(g:ctrlp_allfiles) > s:nocache_lim - if len(g:ctrlp_allfiles) > s:nocache_lim | let s:caching = 1 | en + let fwrite = len(g:ctrlp_allfiles) > s:nocache_lim + if ( g:ctrlp_newcache || !filereadable(a:cache_file) ) && s:caching || fwrite + if fwrite | let s:caching = 1 | en cal ctrlp#utils#writecache(g:ctrlp_allfiles) let g:ctrlp_newcache = 0 en @@ -1768,8 +1767,6 @@ fu! s:autocmds() aug END en endf - -cal s:autocmds() "}}} " vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2 diff --git a/autoload/ctrlp/buffertag.vim b/autoload/ctrlp/buffertag.vim index d4efa03..73c5d9b 100644 --- a/autoload/ctrlp/buffertag.vim +++ b/autoload/ctrlp/buffertag.vim @@ -25,6 +25,12 @@ cal add(g:ctrlp_ext_vars, { let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars) +let [s:pref, s:opts] = ['g:ctrlp_buftag_', { + \ 'systemenc': ['s:enc', &enc], + \ 'ctags_bin': ['s:bin', ''], + \ 'types': ['s:usr_types', {}], + \ }] + let s:bins = [ \ 'ctags-exuberant', \ 'exuberant-ctags', @@ -83,13 +89,8 @@ if executable('jsctags') en fu! ctrlp#buffertag#opts() - let [pref, opts] = ['g:ctrlp_buftag_', { - \ 'systemenc': ['s:enc', &enc], - \ 'ctags_bin': ['s:bin', ''], - \ 'types': ['s:usr_types', {}], - \ }] - for [ke, va] in items(opts) - let {va[0]} = exists(pref.ke) ? {pref.ke} : va[1] + for [ke, va] in items(s:opts) + let {va[0]} = exists(s:pref.ke) ? {s:pref.ke} : va[1] endfo " Ctags bin if empty(s:bin) @@ -103,7 +104,6 @@ fu! ctrlp#buffertag#opts() " Types cal extend(s:types, s:usr_types) endf -cal ctrlp#buffertag#opts() " Utilities {{{1 fu! s:validfile(fname, ftype) if ( !empty(a:fname) || !empty(a:ftype) ) && filereadable(a:fname)