annotate vim/vimfiles/plugin/ctrlp.vim @ 0:48859d9c82c5

Initial commit, based on settings used at work (minus NERD tree & some tagging plugins).
author Brian Neal <bgneal@gmail.com>
date Tue, 03 Jan 2012 20:53:13 -0600
parents
children 92af3257a261
rev   line source
bgneal@0 1 " =============================================================================
bgneal@0 2 " File: plugin/ctrlp.vim
bgneal@0 3 " Description: Fuzzy file, buffer, mru and tag finder.
bgneal@0 4 " Author: Kien Nguyen <github.com/kien>
bgneal@0 5 " =============================================================================
bgneal@0 6 " GetLatestVimScripts: 3736 1 :AutoInstall: ctrlp.zip
bgneal@0 7
bgneal@0 8 if ( exists('g:loaded_ctrlp') && g:loaded_ctrlp ) || v:version < 700 || &cp
bgneal@0 9 fini
bgneal@0 10 en
bgneal@0 11 let [g:loaded_ctrlp, g:ctrlp_lines, g:ctrlp_allfiles] = [1, [], []]
bgneal@0 12
bgneal@0 13 if !exists('g:ctrlp_map') | let g:ctrlp_map = '<c-p>' | en
bgneal@0 14
bgneal@0 15 com! -na=? -comp=custom,ctrlp#cpl CtrlP cal ctrlp#init(0, <q-args>)
bgneal@0 16
bgneal@0 17 com! CtrlPBuffer cal ctrlp#init(1)
bgneal@0 18 com! CtrlPMRUFiles cal ctrlp#init(2)
bgneal@0 19
bgneal@0 20 com! ClearCtrlPCache cal ctrlp#clr()
bgneal@0 21 com! ClearAllCtrlPCaches cal ctrlp#clra()
bgneal@0 22 com! ResetCtrlP cal ctrlp#reset()
bgneal@0 23
bgneal@0 24 com! CtrlPCurWD cal ctrlp#init(0, 0)
bgneal@0 25 com! CtrlPCurFile cal ctrlp#init(0, 1)
bgneal@0 26 com! CtrlPRoot cal ctrlp#init(0, 2)
bgneal@0 27
bgneal@0 28 exe 'nn <silent>' g:ctrlp_map ':<c-u>CtrlP<cr>'
bgneal@0 29
bgneal@0 30 cal ctrlp#mrufiles#init()
bgneal@0 31
bgneal@0 32 if !exists('g:ctrlp_extensions') | fini | en
bgneal@0 33
bgneal@0 34 if index(g:ctrlp_extensions, 'tag') >= 0
bgneal@0 35 let g:ctrlp_alltags = [] | com! CtrlPTag cal ctrlp#init(ctrlp#tag#id())
bgneal@0 36 en
bgneal@0 37
bgneal@0 38 if index(g:ctrlp_extensions, 'quickfix') >= 0
bgneal@0 39 com! CtrlPQuickfix cal ctrlp#init(ctrlp#quickfix#id())
bgneal@0 40 en
bgneal@0 41
bgneal@0 42 if index(g:ctrlp_extensions, 'dir') >= 0
bgneal@0 43 let g:ctrlp_alldirs = [] | com! CtrlPDir cal ctrlp#init(ctrlp#dir#id())
bgneal@0 44 en