From 85863956d89796f760256c61c42a53a06658b1c1 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sun, 31 Dec 2017 15:13:07 -0600 Subject: [PATCH] .vimrc: Add vim-gitgutter plugin --- .vimrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 0269b4f..0227c00 100644 --- a/.vimrc +++ b/.vimrc @@ -17,6 +17,7 @@ set autoread " reload files (no local changes only) call plug#begin('~/.vim/plugged') +Plug 'airblade/vim-gitgutter' Plug 'altercation/vim-colors-solarized' Plug 'kien/ctrlp.vim' Plug 'kopischke/vim-fetch' @@ -74,14 +75,17 @@ if !exists('g:airline_symbols') let g:airline_symbols = {} endif if has("gui_running") - let g:airline_powerline_fonts = 1 " use powerline font symbols + let g:airline_powerline_fonts = 1 " use powerline font symbols else - let g:airline_symbols_ascii = 1 " use plain ascii symbols + let g:airline_symbols_ascii = 1 " use plain ascii symbols let g:airline_symbols.branch = 'BR:' endif let g:airline_symbols.linenr = '' let g:airline_symbols.maxlinenr = '' +" gitgutter +let g:gitgutter_enabled = 0 " disable by default + " --------------------------------------------------------------------------- " Terminal Settings " --------------------------------------------------------------------------- @@ -154,6 +158,7 @@ set nowritebackup " do not keep a backup while working set backupcopy=yes " keep attributes of original file set backupskip=/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/* set directory=.,~/tmp,~/.vim/swap " swap file directory-order +set updatetime=1000 " idle time before writing swap file to disk " ---------------------------------------------------------------------------- " UI @@ -321,6 +326,11 @@ nmap tw :set wrap! wrap? nmap ws :set list! list? " open tag definition in a horz split nmap tag :split :exec("tag ".expand("")) +" gitgutter +nmap ht :GitGutterToggle +nmap hp GitGutterPreviewHunk +nmap hu GitGutterUndoHunk +nmap hs GitGutterStageHunk " -------------------------------------------------------------------------- " Functions -- 2.47.1