From 33fbfa8bc2340fc5063797cc1c41eb68899909d8 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Tue, 1 May 2012 10:59:48 -0500 Subject: [PATCH] Adding the faster indexing to ctrl-p --- vimrc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/vimrc b/vimrc index ef5101a..3fee114 100644 --- a/vimrc +++ b/vimrc @@ -159,9 +159,6 @@ endif " Supertab " let g:SuperTabDefaultCompletionType="context" -" CtrlP -nnoremap b :CtrlPBuffer - " open the current file for edit in Perforce nnoremap 4 :! p4 edit % @@ -173,3 +170,17 @@ nnoremap a :Ack " Clam nnoremap ! :Clam + +" CtrlP +nnoremap b :CtrlPBuffer +" Set the max files +let g:ctrlp_max_files = 10000 +" Optimize file searching +if has("unix") + let g:ctrlp_user_command = { + \ 'types': { + \ 1: ['.git/', 'cd %s && git ls-files'] + \ }, + \ 'fallback': 'find %s -type f | head -' . g:ctrlp_max_files + \ } +endif