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@0: bgneal@0: com! -na=? -comp=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@0: com! ClearCtrlPCache cal ctrlp#clr() bgneal@0: com! ClearAllCtrlPCaches cal ctrlp#clra() bgneal@0: 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@0: exe 'nn ' g:ctrlp_map ':CtrlP' 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@0: let g:ctrlp_alldirs = [] | com! CtrlPDir cal ctrlp#init(ctrlp#dir#id()) bgneal@0: en