2

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

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

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

4

2 回答 2

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'

放入你的 vimrc :

let g:ctrlp_map='<c-p>'
let g:ctrlp_cmd = 'CtrlPMRU'
于 2015-11-30T09:30:01.653 回答
0
  1. 不要启动 Vim,也不要在$HOME. 一开始这是一个非常愚蠢的想法,再多的ag基于自定义的定制也不会让它变得更好。

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

  2. 使用:CtrlPMRU命令而不是:CtrlP.

于 2015-11-30T06:27:36.923 回答