aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/plugin/ctrlp.vim
blob: 9c3b7bdcf1e69f8569c3042c602ad92944d86aa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if get(g:, 'loaded_fzf', 0) == 0 && get(g:, 'loaded_fzf_vim', 0) == 0
    let g:ctrlp_map = '<leader>ff'
    let g:ctrlp_cmd = 'CtrlP'
    let g:ctrlp_working_path_mode = 'ra'
    let g:ctrlp_regexp = 1
    let g:ctrlp_use_caching = 0
    let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'line']
    let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }

    let g:ctrlp_user_command = 'find %s -type f'
    if executable('fd')
        let g:ctrlp_user_command = 'fd --hidden --type f . %s'
    endif

    nnoremap <leader>fb :CtrlPBuffer<CR>
    nnoremap <leader>fm :CtrlPMRU<CR>
    nnoremap <leader>fT :CtrlPTag<CR>
    nnoremap <leader>ft :CtrlPBufTag bufnr()<CR>
    nnoremap <leader>fq :CtrlPQuickfix<CR>
    nnoremap <leader>fl :CtrlPLine bufnr()<CR>

    packadd ctrlp.vim
endif