kien/ctrlp.vim — Issue #144: call different ctrlP command depending on prefix
Author: skeept
Created: 2012-02-21 16:06:41+00:00
State: open

This is a suggestion for being able to call different ctrlP commands depending on the prefix passed to

So
0 or --> CtrlP
1 --> CtrlPCurWD
2 --> CtrlPDir

This could be accomplished by defining a function:

fu! CtrlPCall()
if v:count == 0
CtrlP
elseif v:count == 1
CtrlPCurWD
elseif v:count == 2
CtrlpDir
else
echo "no such option. Choose 0 -- 2"
endif
endfunction

Then the mapping used to call this function would be:
map :call CtrlPCall()

This could be extended to mappings from 0 to 9 and could be configured
by letting the user specify which command corrresponds to which number.