Reputation: 3364
The CtrlP's default file mode is too slow when I open CtrlP in the root of my $HOME dir. it is due to that there are too much files and dirs in my home dir.
I have speeded up the scanning according to this answer by using ag
command instead. However, the scan speed is still slow.
So, I want to set the MRU mode as the default mode of CtrlP. How to do that?
Upvotes: 2
Views: 2756
Reputation: 42278
I agree with @romainl's answer, however for the sake of answering the question :
From :help CtrlP
*'g:ctrlp_map'*
Use this option to change the mapping to invoke CtrlP in |Normal| mode: >
let g:ctrlp_map = '<c-p>'
*'g:ctrlp_cmd'*
Set the default opening command to use when pressing the above mapping: >
let g:ctrlp_cmd = 'CtrlP'
Put in your vimrc :
let g:ctrlp_map='<c-p>'
let g:ctrlp_cmd = 'CtrlPMRU'
Upvotes: 6
Reputation: 196906
Don't start Vim, and don't use a fuzzy finder, in your $HOME
. It's a pretty stupid idea to begin with and no amount of ag
-based customization will make it better.
There's only one useful way to start Vim: navigate to your project and run Vim there.
Use the :CtrlPMRU
command instead of :CtrlP
.
Upvotes: 0