From 2185271ce9df1464a3f578d3529c29e2c618323f Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 14 Jul 2022 15:37:41 +0200 Subject: [PATCH] vimrc: add ctrlP settings --- .vim/vimrc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.vim/vimrc b/.vim/vimrc index 6118963..20325f7 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -312,6 +312,34 @@ let g:terraform_align=1 let g:terraform_fold_sections=1 let g:terraform_fmt_on_save=1 + +" ctrlp +" Setup some default ignores +let g:ctrlp_custom_ignore = { + \ 'dir':'\v[\/](\.(git\/(branches|hooks|info|logs|modules|objects|rebase-merge|refs)|hg|svn)|\_site)$', + \ 'file':'\v\.(exe|so|dll|class|png|jpg|jpeg)|(\.(git\/(description|index|packed-refs|COMMIT_EDITMSG|HEAD|FETCH_HEAD|ORIG_HEAD|REBASE_HEAD)))$', + \} + +" Use the nearest .git directory as the cwd +" This makes a lot of sense if you are working on a project that is in version +" control. It also supports works with .svn, .hg, .bzr. +" let g:ctrlp_working_path_mode = 'r' +let g:ctrlp_working_path_mode = 'raw' + +nnoremap '' : + +let g:ctrlp_map = '' +let g:ctrlp_show_hidden = 1 +" Use a leader instead of the actual named binding +nmap p :CtrlP + +" ctrlp buffers +" Easy bindings for its various modes +nmap bb :CtrlPBuffer +nmap bm :CtrlPMixed +nmap bs :CtrlPMRU + + " change cursor shape for different editing modes, neovim does this by default if !has('nvim') if exists('$TMUX')