1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:30:05 +08:00

fixes #373 ctrlp configs are all dynamic

https://github.com/SpaceVim/SpaceVim/issues/373
This commit is contained in:
alan bount 2017-03-28 22:24:07 -04:00
parent 83ae9a62aa
commit c1c46335df

View File

@ -1,21 +1,21 @@
let g:ctrlp_map = get(g:,'ctrlp_map', '<c-p>') let g:ctrlp_map = get(g:,'ctrlp_map', '<c-p>')
let g:ctrlp_cmd = 'CtrlP' let g:ctrlp_cmd = get(g:, 'ctrlp_cmd', 'CtrlP')
let g:ctrlp_working_path_mode = 'ra' let g:ctrlp_working_path_mode = get(g:, 'ctrlp_working_path_mode', 'ra')
let g:ctrlp_root_markers = 'pom.xml' let g:ctrlp_root_markers = get(g:, 'ctrlp_root_markers', 'pom.xml')
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:15,results:15' let g:ctrlp_match_window = get(g:, 'ctrlp_match_window', 'bottom,order:btt,min:1,max:15,results:15')
let g:ctrlp_show_hidden = 1 let g:ctrlp_show_hidden = get(g:, 'ctrlp_show_hidden', 1)
"for caching "for caching
let g:ctrlp_use_caching = 500 let g:ctrlp_use_caching = get(g:, 'ctrlp_use_caching', 500)
let g:ctrlp_clear_cache_on_exit = 1 let g:ctrlp_clear_cache_on_exit = get(g:, 'ctrlp_clear_cache_on_exit', 1)
let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp' let g:ctrlp_cache_dir = get(g:, 'ctrlp_cache_dir', $HOME.'/.cache/ctrlp')
"let g:ctrlp_map = ',,' "let g:ctrlp_map = ',,'
"let g:ctrlp_open_multiple_files = 'v' "let g:ctrlp_open_multiple_files = 'v'
"if you have install ag, the g:ctrlp_custom_ignore will not work "if you have install ag, the g:ctrlp_custom_ignore will not work
let g:ctrlp_custom_ignore = { let g:ctrlp_custom_ignore = get(g:, 'ctrlp_custom_ignore', {
\ 'dir': '\v[\/]\.(git|hg|svn)$|target|node_modules|te?mp$|logs?$|public$|dist$', \ 'dir': '\v[\/]\.(git|hg|svn)$|target|node_modules|te?mp$|logs?$|public$|dist$',
\ 'file': '\v\.(exe|so|dll|ttf|png|gif|jpe?g|bpm)$|\-rplugin\~', \ 'file': '\v\.(exe|so|dll|ttf|png|gif|jpe?g|bpm)$|\-rplugin\~',
\ 'link': 'some_bad_symbolic_links', \ 'link': 'some_bad_symbolic_links',
\ } \ })
if executable('rg') && !exists('g:ctrlp_user_command') if executable('rg') && !exists('g:ctrlp_user_command')
let g:ctrlp_user_command = 'rg %s --no-ignore --hidden --files -g "" ' let g:ctrlp_user_command = 'rg %s --no-ignore --hidden --files -g "" '
\ . join(zvim#util#Generate_ignore(g:spacevim_wildignore,'rg')) \ . join(zvim#util#Generate_ignore(g:spacevim_wildignore,'rg'))
@ -30,10 +30,10 @@ endif
nnoremap <Leader>fu :CtrlPFunky<Cr> nnoremap <Leader>fu :CtrlPFunky<Cr>
" narrow the list down with a word under cursor " narrow the list down with a word under cursor
nnoremap <Leader>fU :execute 'CtrlPFunky ' . expand('<cword>')<Cr> nnoremap <Leader>fU :execute 'CtrlPFunky ' . expand('<cword>')<Cr>
let g:ctrlp_funky_syntax_highlight = 1 let g:ctrlp_funky_syntax_highlight = get(g:, 'ctrlp_funky_syntax_highlight', 1)
" }}} " }}}
"for ctrlp_nerdtree {{{ "for ctrlp_nerdtree {{{
let g:ctrlp_nerdtree_show_hidden = 1 let g:ctrlp_nerdtree_show_hidden = get(g:, 'ctrlp_nerdtree_show_hidden', 1)
"}}} "}}}
"for ctrlp_sessions{{{ "for ctrlp_sessions{{{
let g:ctrlp_extensions = ['funky', 'sessions' , 'k' , 'tag', 'mixed', 'quickfix', 'undo', 'line', 'changes', 'cmdline', 'menu'] let g:ctrlp_extensions = ['funky', 'sessions' , 'k' , 'tag', 'mixed', 'quickfix', 'undo', 'line', 'changes', 'cmdline', 'menu']