在CtrlP中,如何将`mru`模式设置为默认模式?

Dou*_* Su 2 vim ctrlp

当我在 $HOME 目录的根目录中打开 CtrlP 时,CtrlP 的默认文件模式太慢了。这是由于我的主目录中有太多文件和目录。

我已经根据这个答案通过使用ag命令加快了扫描速度。但是,扫描速度仍然很慢。

所以,我想将MRU模式设置为CtrlP的默认模式。怎么做?

Xav*_* T. 5

我同意@romainl 的回答,但是为了回答这个问题:

: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'
Run Code Online (Sandbox Code Playgroud)

放入你的 vimrc :

let g:ctrlp_map='<c-p>'
let g:ctrlp_cmd = 'CtrlPMRU'
Run Code Online (Sandbox Code Playgroud)