X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/731ecff103be07c9ccc49ed8c6cc23d9eb969224..9dd90d24e0758be86b5d695e242fce9a5baf8bcb:/vim/vimrc?ds=inline diff --git a/vim/vimrc b/vim/vimrc index fd2e8f9..8b3ea4f 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -31,11 +31,13 @@ Plug 'majutsushi/tagbar' Plug 'octol/vim-cpp-enhanced-highlight' Plug 'raimondi/delimitmate' Plug 'ram-z/vim-clang-format', { 'branch': 'fix-undo' } -Plug 'ram-z/vimwiki', { 'branch': 'no_override_map' } +" fix some issue with vim-clang-format not finding .clang-format +let g:clang_format#detect_style_file = 1 +Plug 'vimwiki/vimwiki', { 'branch': 'dev' } Plug 'scrooloose/syntastic' Plug 'sgeb/vim-diff-fold' Plug 'shougo/unite.vim' -Plug 'shougo/vimproc.vim' +Plug 'shougo/vimproc.vim', {'do': 'make'} Plug 'sjl/gundo.vim' Plug 'thinca/vim-qfreplace' Plug 'tomtom/tcomment_vim' @@ -53,7 +55,7 @@ Plug 'vim-scripts/replacewithregister' Plug 'vim-scripts/yankring.vim' " colorschemes -Plug 'flazz/vim-colorschemes' +Plug 'morhetz/gruvbox' " snippets Plug 'sirver/ultisnips' @@ -112,7 +114,7 @@ set list " show chars defined in 'listchars' set listchars=tab:❭\ " list of strings used for list mode set listchars+=extends:❯,precedes:❮ " Only shown when not in insert mode -au InsertLeave * :set listchars+=trail:· +set listchars+=trail:· augroup trailing au! au InsertEnter * :set listchars-=trail:· @@ -340,8 +342,21 @@ augroup END map " make -nnoremap r :make! -nnoremap :make! +function! Make() + let l:make_dir = "" + if exists("b:make_dir") + let l:make_dir = "-C ".b:make_dir + elseif exists("g:make_dir") + let l:make_dir = "-C ".g:make_dir + endif + + let l:make_targets = "" + if exists("g:make_targets") + let l:make_targets = g:make_targets + endif + execute "make! ".l:make_dir." ".l:make_targets +endf +nnoremap r :call Make() " unhighlight search nnoremap / :silent nohl @@ -419,8 +434,8 @@ cnoremap cnoremap " proper movement when lines are wrapped -noremap j (v:count == 0 ? 'gj' : 'j') -noremap k (v:count == 0 ? 'gk' : 'k') +noremap j (v:count == 0 ? 'gj' : 'j') +noremap k (v:count == 0 ? 'gk' : 'k') " disable arrows noremap @@ -536,6 +551,11 @@ nnoremap gc :Gcommit -v nnoremap ga :Gwrite nnoremap gb :Gblame +augroup fugitive_gstatus + au! + autocmd BufWinEnter */.git/index resize 16 +augroup end + " Gundo {{{2 nnoremap :GundoToggle @@ -592,6 +612,8 @@ let g:syntastic_style_warning_symbol='S' let g:syntastic_always_populate_loc_list=1 nmap y :SyntasticCheck +let g:syntastic_cpp_clang_tidy_post_args = "-p build*" + if ! &diff let g:syntastic_check_on_open=1 endif