filebrowser.vim 905 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. " Netrw - Vim's built-in file browser.
  2. " Open files and toggle folders with 'o' like in QuickFix.
  3. autocmd FileType netrw map <silent> <buffer> o <CR>
  4. " Errors should not open new splits. Use normal error handling, `:messages`.
  5. let g:netrw_use_errorwindow = 0
  6. " Use tree-style browsing by default
  7. " 0 = normal, 1 = details, 2 = ls, 3 = tree
  8. let g:netrw_liststyle = 3
  9. " CtrlP - Fuzzy Finder in Vimscript
  10. "let g:ctrlp_map = '<Leader>p'
  11. " Use `ag` as fallback if available.
  12. if executable('ag')
  13. let s:fallback = 'ag %s -l --nocolor -g ""'
  14. else
  15. let s:fallback = 'find %s -type f'
  16. endif
  17. let g:ctrlp_user_command = [
  18. \ '.git',
  19. \ 'cd %s && git ls-files . -co --exclude-standard',
  20. \ s:fallback
  21. \]
  22. let g:ctrlp_extensions = ['funky']
  23. " Function definition jumping with CtrlP's Funky plugin.
  24. map <silent> <Leader>f :CtrlPFunky<CR>
  25. " FZF - Fuzzy Finder in Go/Ruby
  26. map <silent> <Leader>p :FZF<CR>