X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/2d4e505b0462bf08aa368941941d17979812e285..9dd90d24e0758be86b5d695e242fce9a5baf8bcb:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 9995296..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' } +" 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' @@ -333,9 +335,6 @@ augroup terminal au! au TerminalOpen * if &buftype == 'terminal' | setlocal bufhidden=hide | endif augroup END -" vertical split TermDebug -let g:termdebug_wide = 1 -command! -nargs=* -bang -complete=file Debug tabedit % | Termdebug " bindings {{{1 @@ -343,8 +342,21 @@ command! -nargs=* -bang -complete=file Debug tabedit % | Termdebug 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 @@ -422,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