Some clean ups
This commit is contained in:
parent
9f5e949d66
commit
93ab44a31d
@ -215,7 +215,6 @@ fu! s:opts() "{{{2
|
|||||||
cal extend(s:prtmaps, s:urprtmaps)
|
cal extend(s:prtmaps, s:urprtmaps)
|
||||||
en
|
en
|
||||||
endf
|
endf
|
||||||
cal s:opts()
|
|
||||||
"}}}1
|
"}}}1
|
||||||
" * Open & Close {{{1
|
" * Open & Close {{{1
|
||||||
fu! s:Open()
|
fu! s:Open()
|
||||||
@ -1653,9 +1652,9 @@ fu! s:mmode()
|
|||||||
endf
|
endf
|
||||||
" Cache {{{2
|
" Cache {{{2
|
||||||
fu! s:writecache(cache_file)
|
fu! s:writecache(cache_file)
|
||||||
if ( g:ctrlp_newcache || !filereadable(a:cache_file) ) && s:caching
|
let fwrite = len(g:ctrlp_allfiles) > s:nocache_lim
|
||||||
\ || len(g:ctrlp_allfiles) > s:nocache_lim
|
if ( g:ctrlp_newcache || !filereadable(a:cache_file) ) && s:caching || fwrite
|
||||||
if len(g:ctrlp_allfiles) > s:nocache_lim | let s:caching = 1 | en
|
if fwrite | let s:caching = 1 | en
|
||||||
cal ctrlp#utils#writecache(g:ctrlp_allfiles)
|
cal ctrlp#utils#writecache(g:ctrlp_allfiles)
|
||||||
let g:ctrlp_newcache = 0
|
let g:ctrlp_newcache = 0
|
||||||
en
|
en
|
||||||
@ -1768,8 +1767,6 @@ fu! s:autocmds()
|
|||||||
aug END
|
aug END
|
||||||
en
|
en
|
||||||
endf
|
endf
|
||||||
|
|
||||||
cal s:autocmds()
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2
|
" vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2
|
||||||
|
@ -25,6 +25,12 @@ cal add(g:ctrlp_ext_vars, {
|
|||||||
|
|
||||||
let s:id = g:ctrlp_builtins + len(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 = [
|
let s:bins = [
|
||||||
\ 'ctags-exuberant',
|
\ 'ctags-exuberant',
|
||||||
\ 'exuberant-ctags',
|
\ 'exuberant-ctags',
|
||||||
@ -83,13 +89,8 @@ if executable('jsctags')
|
|||||||
en
|
en
|
||||||
|
|
||||||
fu! ctrlp#buffertag#opts()
|
fu! ctrlp#buffertag#opts()
|
||||||
let [pref, opts] = ['g:ctrlp_buftag_', {
|
for [ke, va] in items(s:opts)
|
||||||
\ 'systemenc': ['s:enc', &enc],
|
let {va[0]} = exists(s:pref.ke) ? {s:pref.ke} : va[1]
|
||||||
\ 'ctags_bin': ['s:bin', ''],
|
|
||||||
\ 'types': ['s:usr_types', {}],
|
|
||||||
\ }]
|
|
||||||
for [ke, va] in items(opts)
|
|
||||||
let {va[0]} = exists(pref.ke) ? {pref.ke} : va[1]
|
|
||||||
endfo
|
endfo
|
||||||
" Ctags bin
|
" Ctags bin
|
||||||
if empty(s:bin)
|
if empty(s:bin)
|
||||||
@ -103,7 +104,6 @@ fu! ctrlp#buffertag#opts()
|
|||||||
" Types
|
" Types
|
||||||
cal extend(s:types, s:usr_types)
|
cal extend(s:types, s:usr_types)
|
||||||
endf
|
endf
|
||||||
cal ctrlp#buffertag#opts()
|
|
||||||
" Utilities {{{1
|
" Utilities {{{1
|
||||||
fu! s:validfile(fname, ftype)
|
fu! s:validfile(fname, ftype)
|
||||||
if ( !empty(a:fname) || !empty(a:ftype) ) && filereadable(a:fname)
|
if ( !empty(a:fname) || !empty(a:ftype) ) && filereadable(a:fname)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user