dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit edb443c5cfa03738c1f05ea5588be14d407e1911
parent 0f3f8c9ddfa8bb846b8ea1a34f739ef8c73842cc
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Thu,  4 Jun 2015 19:19:53 +0200

use ag or git for CtrlP

Diffstat:
M.vimrc | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/.vimrc b/.vimrc @@ -391,6 +391,19 @@ nmap <leader>p :CtrlPBuffer<CR> nmap <leader>O :CtrlPMRUFiles<CR> nmap <leader>o :CtrlP<CR> +" use git or silver searcher (ag) for CtrlP autocompletion +let g:ctrlp_use_caching = 0 +if executable('ag') + set grepprg=ag\ --nogroup\ --nocolor + + let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' +else + let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f'] + let g:ctrlp_prompt_mappings = { + \ 'AcceptSelection("e")': ['<space>', '<cr>', '<2-LeftMouse>'], + \ } +endif + " Copy and paste to system clipboard with <Space>p and <Space>y vmap <Leader>y "+y vmap <Leader>d "+d