From 3d793178e6ea5eaadb81a2dc6439673c0692bbd1 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Fri, 24 Apr 2015 21:04:00 -0500 Subject: [PATCH] fix ctrlp to only show git tracked files --- vim/vimrc.symlink | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vim/vimrc.symlink b/vim/vimrc.symlink index f7375893c..8c325f30e 100644 --- a/vim/vimrc.symlink +++ b/vim/vimrc.symlink @@ -421,10 +421,12 @@ let g:syntastic_typescript_checkers = ['tslint'] let g:syntastic_javascript_checkers = ['jshint', 'jscs'] " CtrlP ignore patterns -let g:ctrlp_custom_ignore = { - \ 'dir': '\.git$\|node_modules$\|bower_components$\|\.hg$\|\.svn$', - \ 'file': '\.exe$\|\.so$' - \ } +" let g:ctrlp_custom_ignore = { +" \ 'dir': '\.git$\|node_modules$\|bower_components$\|\.hg$\|\.svn$', +" \ 'file': '\.exe$\|\.so$' +" \ } +" only show files that are not ignored by git +let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] " search the nearest ancestor that contains .git, .hg, .svn let g:ctrlp_working_path_mode = 2