christoomey / dotfiles

My vim, zsh, git, tmux, and other config files and utility scripts.
MIT License
464 stars 31 forks source link

Ctrlp and agignore #111

Closed jrock2004 closed 7 years ago

jrock2004 commented 9 years ago

I have setup my vimrc to use ag but I cannot get the agignore file to be used by ctrlp to ignore certain files or directories. Do I have to add something to my vimrc to tell ctrlp to use agignore file?

if executable('ag')
    " Use Ag over Grep
    set grepprg=ag\ --nogroup\ --nocolor

    " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
    let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""'

    " ag is fast enough that CtrlP doesn't need to cache
    let g:ctrlp_use_caching = 0
endif

""""" CtrlP
nmap <silent> <leader>r :CtrlPBuffer<cr>
let g:ctrlp_map='<leader>t'
let g:ctrlp_dotfiles=1
let g:ctrlp_working_path_mode = 'ra'

Thanks