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

In CtrlP, how to set the `mru` mode as the default mode?

当我在 $HOME 目录的根目录中打开 CtrlP 时,CtrlP 的默认文件模式太慢了。这是因为我家目录里的文件和目录太多了。

我已根据 this answer 使用 ag 命令加快了扫描速度。但是,扫描速度仍然很慢。

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

  1. 不要在 $HOME 中启动 Vim,也不要使用模糊查找器。这是一个非常愚蠢的想法,再多的基于 ag 的定制也无法让它变得更好。

    只有一种有用的方法可以启动 Vim:导航到您的项目并 运行 Vim 在那里。

  2. 使用:CtrlPMRU命令代替:CtrlP

我同意@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'

输入你的 vimrc :

let g:ctrlp_map='<c-p>'
let g:ctrlp_cmd = 'CtrlPMRU'