ctrlp.vim/plugin/ctrlp.vim

61 lines
1.9 KiB
VimL
Raw Normal View History

2011-09-05 19:30:54 -04:00
" =============================================================================
2011-06-20 21:21:58 -04:00
" File: plugin/ctrlp.vim
" Description: Fuzzy file, buffer, mru and tag finder.
2011-09-05 19:30:54 -04:00
" Author: Kien Nguyen <github.com/kien>
" =============================================================================
" GetLatestVimScripts: 3736 1 :AutoInstall: ctrlp.zip
2011-06-20 21:21:58 -04:00
if ( exists('g:loaded_ctrlp') && g:loaded_ctrlp ) || v:version < 700 || &cp
2011-08-21 22:14:00 -04:00
fini
en
2012-03-31 01:51:33 -04:00
let g:loaded_ctrlp = 1
let [g:ctrlp_lines, g:ctrlp_allfiles, g:ctrlp_alltags, g:ctrlp_alldirs,
\ g:ctrlp_buftags, g:ctrlp_builtins] = [[], [], [], [], {}, 2]
2011-06-20 21:21:58 -04:00
if !exists('g:ctrlp_map') | let g:ctrlp_map = '<c-p>' | en
if !exists('g:ctrlp_cmd') | let g:ctrlp_cmd = 'CtrlP' | en
2011-06-20 21:21:58 -04:00
com! -n=? -com=dir CtrlP cal ctrlp#init(0, <q-args>)
com! CtrlPBuffer cal ctrlp#init(1)
com! CtrlPMRUFiles cal ctrlp#init(2)
com! CtrlPClearCache cal ctrlp#clr()
com! CtrlPClearAllCaches cal ctrlp#clra()
2012-03-03 13:53:34 -05:00
com! CtrlPReload cal ctrlp#reset()
com! ClearCtrlPCache cal ctrlp#clr()
com! ClearAllCtrlPCaches cal ctrlp#clra()
com! ResetCtrlP cal ctrlp#reset()
2011-06-20 21:21:58 -04:00
2011-09-08 17:39:59 -04:00
com! CtrlPCurWD cal ctrlp#init(0, 0)
com! CtrlPCurFile cal ctrlp#init(0, 1)
com! CtrlPRoot cal ctrlp#init(0, 2)
2011-09-08 14:16:12 -04:00
2012-02-23 13:19:44 -05:00
if g:ctrlp_map != '' && !hasmapto(':<c-u>'.g:ctrlp_cmd.'<cr>', 'n')
exe 'nn <silent>' g:ctrlp_map ':<c-u>'.g:ctrlp_cmd.'<cr>'
en
cal ctrlp#mrufiles#init()
2012-03-31 01:51:33 -04:00
com! CtrlPTag cal ctrlp#init(ctrlp#tag#id())
2012-03-31 01:51:33 -04:00
com! CtrlPQuickfix cal ctrlp#init(ctrlp#quickfix#id())
2012-03-31 01:51:33 -04:00
com! -n=? -com=dir CtrlPDir cal ctrlp#init(ctrlp#dir#id(), <q-args>)
2012-03-31 01:51:33 -04:00
com! -n=? -com=buffer CtrlPBufTag
\ cal ctrlp#init(ctrlp#buffertag#cmd(0, <q-args>))
com! CtrlPBufTagAll cal ctrlp#init(ctrlp#buffertag#cmd(1))
2012-03-31 01:51:33 -04:00
com! CtrlPRTS cal ctrlp#init(ctrlp#rtscript#id())
2012-03-12 04:34:40 -04:00
2012-03-31 01:51:33 -04:00
com! CtrlPUndo cal ctrlp#init(ctrlp#undo#id())
2012-03-12 04:34:40 -04:00
2012-03-31 01:51:33 -04:00
com! CtrlPLine cal ctrlp#init(ctrlp#line#id())
2012-03-12 04:34:40 -04:00
2012-03-31 01:51:33 -04:00
com! -n=? -com=buffer CtrlPChange
\ cal ctrlp#init(ctrlp#changes#cmd(0, <q-args>))
com! CtrlPChangeAll cal ctrlp#init(ctrlp#changes#cmd(1))