diff --git a/bundles-init/vim-fugitive.cfg.vim b/bundles-init/vim-fugitive.cfg.vim index 571cc75..a90a677 100644 --- a/bundles-init/vim-fugitive.cfg.vim +++ b/bundles-init/vim-fugitive.cfg.vim @@ -1,4 +1,5 @@ " Fugitive commands that don't require interaction with GitGutter or NERDTree +nnoremap ga :Git add %:p nnoremap gd :Gdiff nnoremap gs :Gstatus nnoremap gc :Gcommit -q @@ -8,5 +9,6 @@ nnoremap gb :Git branch nnoremap gB :Git checkout -b nnoremap gC :Git checkout nnoremap gM :Gmove +nnoremap gp :Git pull --recurse-submodules nnoremap gP :Git push nnoremap gR :Gremove diff --git a/bundles-init/vim-gitgutter.cfg.vim b/bundles-init/vim-gitgutter.cfg.vim index daf6b71..9124232 100644 --- a/bundles-init/vim-gitgutter.cfg.vim +++ b/bundles-init/vim-gitgutter.cfg.vim @@ -1,23 +1,22 @@ -function! RunGitOp(op) - execute "Silent" a:op - GitGutter - - let wins = filter( range( 1 , winnr( '$' ) ) , - \ "buffer_name(winbufnr(v:val)) =~ '^NERD_tree_[0-9]\\+$'" ) - if empty( l:wins ) - return - endif - - let wn = winnr() - call NERDTreeFocus() - call feedkeys( "R:" . l:wn . "wincmd w\:\" , 't' ) -endfunction - - +" Key maps let g:gitgutter_map_keys = 0 nnoremap g< :GitGutterPrevHunk nnoremap g> :GitGutterNextHunk -nnoremap g+ :call RunGitOp( 'GitGutterStageHunk' ) +nnoremap g+ :GitGutterStageHunk nnoremap g- :GitGutterRevertHunk -nnoremap ga :call RunGitOp( 'Git add %:p' ) +" Symbols +let g:gitgutter_sign_added = '+' +let g:gitgutter_sign_modified = '±' +let g:gitgutter_sign_removed = '∅' + +" Symbol colors +highlight GitGutterAdd ctermfg=10 ctermbg=236 +highlight GitGutterChange ctermfg=11 ctermbg=236 +highlight GitGutterDelete ctermfg=9 ctermbg=236 cterm=bold + +" No highlights for added/changed/deleted lines +highlight GitGutterAddLine ctermbg=0 +highlight GitGutterChangeLine ctermbg=0 +highlight GitGutterDeleteLine ctermbg=0 +highlight GitGutterChangeDeleteLine ctermbg=0 diff --git a/cfg/01-timeouts.vim b/cfg/01-timeouts.vim index 7ccbb97..c043015 100644 --- a/cfg/01-timeouts.vim +++ b/cfg/01-timeouts.vim @@ -1,6 +1,8 @@ " Timeout settings for key sequences - set notimeout set timeoutlen=0 set ttimeout set ttimeoutlen=-1 + +" Time between updates +set updatetime=100 diff --git a/cfg/50-diff-colors.vim b/cfg/50-diff-colors.vim new file mode 100644 index 0000000..33f32d5 --- /dev/null +++ b/cfg/50-diff-colors.vim @@ -0,0 +1,4 @@ +" Diff colors +highlight DiffAdd ctermbg=17 +highlight DiffChange ctermbg=22 +highlight DiffDelete ctermbg=52 diff --git a/cfg/50-sign-column.vim b/cfg/50-sign-column.vim new file mode 100644 index 0000000..0662fc8 --- /dev/null +++ b/cfg/50-sign-column.vim @@ -0,0 +1,3 @@ +" Sign column color and visibility +set signcolumn=yes +highlight SignColumn ctermbg=234