I've managed to solve the issue by patching ctrlp.vim
on .vim/bundle/ctrlp.vim/autoload/
. You need to add this function anywhere:
fu! s:OpenExit()
cal s:AcceptSelection("e")
cal s:PrtExit()
endf
and this after line 144 (one with PtrExit()
):
\ 'OpenExit()': ['<cr>'],
Also, delete the '<cr>'
string from line 123 (the one with AcceptSelection("e")
). This will ensure pressing enter
leaves CtrlP.
Anyway, what is more interesting is that you could edit the Update() function on that file in order to open a file as soon as there is only 1 match, making it faster than having to look for it.