bgneal@0: " ============================================================================= bgneal@0: " File: plugin/ctrlp.vim bgneal@0: " Description: Fuzzy file, buffer, mru and tag finder. bgneal@0: " Author: Kien Nguyen bgneal@0: " ============================================================================= bgneal@0: " GetLatestVimScripts: 3736 1 :AutoInstall: ctrlp.zip bgneal@0: bgneal@0: if ( exists('g:loaded_ctrlp') && g:loaded_ctrlp ) || v:version < 700 || &cp bgneal@0: fini bgneal@0: en bgneal@0: let [g:loaded_ctrlp, g:ctrlp_lines, g:ctrlp_allfiles] = [1, [], []] bgneal@0: bgneal@0: if !exists('g:ctrlp_map') | let g:ctrlp_map = '' | en bgneal@3: if !exists('g:ctrlp_cmd') | let g:ctrlp_cmd = 'CtrlP' | en bgneal@0: bgneal@3: com! -n=? -com=custom,ctrlp#cpl CtrlP cal ctrlp#init(0, ) bgneal@0: bgneal@0: com! CtrlPBuffer cal ctrlp#init(1) bgneal@0: com! CtrlPMRUFiles cal ctrlp#init(2) bgneal@0: bgneal@3: com! ClearCtrlPCache cal ctrlp#clr() bgneal@0: com! ClearAllCtrlPCaches cal ctrlp#clra() bgneal@3: com! ResetCtrlP cal ctrlp#reset() bgneal@0: bgneal@0: com! CtrlPCurWD cal ctrlp#init(0, 0) bgneal@0: com! CtrlPCurFile cal ctrlp#init(0, 1) bgneal@0: com! CtrlPRoot cal ctrlp#init(0, 2) bgneal@0: bgneal@3: exe 'nn ' g:ctrlp_map ':'.g:ctrlp_cmd.'' bgneal@0: bgneal@0: cal ctrlp#mrufiles#init() bgneal@0: bgneal@0: if !exists('g:ctrlp_extensions') | fini | en bgneal@0: bgneal@0: if index(g:ctrlp_extensions, 'tag') >= 0 bgneal@0: let g:ctrlp_alltags = [] | com! CtrlPTag cal ctrlp#init(ctrlp#tag#id()) bgneal@0: en bgneal@0: bgneal@0: if index(g:ctrlp_extensions, 'quickfix') >= 0 bgneal@0: com! CtrlPQuickfix cal ctrlp#init(ctrlp#quickfix#id()) bgneal@0: en bgneal@0: bgneal@0: if index(g:ctrlp_extensions, 'dir') >= 0 bgneal@3: let g:ctrlp_alldirs = [] bgneal@3: com! -n=? -com=custom,ctrlp#cpl CtrlPDir bgneal@3: \ cal ctrlp#init(ctrlp#dir#id(), ) bgneal@0: en bgneal@3: bgneal@3: if index(g:ctrlp_extensions, 'buffertag') >= 0 bgneal@3: let g:ctrlp_buftags = {} bgneal@3: com! CtrlPBufTag cal ctrlp#init(ctrlp#buffertag#id()) bgneal@3: en