diff --git a/vim/after/plugin/gitgutter.vim b/vim/after/plugin/gitgutter.vim new file mode 100644 index 0000000..69ec987 --- /dev/null +++ b/vim/after/plugin/gitgutter.vim @@ -0,0 +1,6 @@ +if !exists(':GitGutter') + finish +endif + +" Disable realtime updates. +autocmd! gitgutter CursorHold,CursorHoldI diff --git a/vimrc b/vimrc index 1e756f8..854dfad 100644 --- a/vimrc +++ b/vimrc @@ -52,36 +52,29 @@ call plug#begin('~/.vim/plugged') " MISC "//////////////////////////////////////////////////////////////// -Plug 'mattn/webapi-vim' " Required by gist-vim -Plug 'mattn/gist-vim' Plug 'bling/vim-airline' -Plug 'vim-scripts/VimCalc' " Requires a vim compiled with Python support Plug 'vim-scripts/AnsiEsc.vim' Plug 'embear/vim-localvimrc' Plug 'tpope/vim-obsession' " Continuously updated session files Plug 'tpope/vim-fugitive' " Git wrapper -" Plug 'tpope/vim-classpath' " For Java Plug 'junegunn/goyo.vim' " Distraction-free mode with centered buffer -Plug 'fedorenchik/VimCalc3' " A calculator inside vim if IsWindows() Plug 'suxpert/vimcaps' " Disable capslock (useful if the OS isn't configured to do so) endif Plug 'itchyny/vim-cursorword' " Underlines the word under the cursor -" Google Calendar - :Calendar, :Calendar , :Calendar -view=year (-split=veritcal -width=) -" :Calendar -view=day, :Calendar -first_day=monday -Plug 'itchyny/calendar.vim' -Plug 'itchyny/screensaver.vim' " A screensaver view - open with :ScreenSaver " (MAYBE) Plug 'itchyny/vim-winfix' +Plug 'airblade/vim-gitgutter' + if !IsWindows() Plug 'Shougo/vimproc.vim', {'do' : 'make'} Plug 'itchyny/dictionary.vim' " A way to query dictionary.com with :Dictionary endif " Automatically discover and 'properly' update ctags files on save -Plug 'craigemery/vim-autotag' +"Plug 'craigemery/vim-autotag' Plug 'majutsushi/tagbar' Plug 'jeetsukumaran/vim-filesearch' @@ -139,9 +132,11 @@ Plug 'nightsense/seabird' " No Win support, unless using gvim "//////////////////////////////////////////////////////////////// " CLOJURE "//////////////////////////////////////////////////////////////// -Plug 'guns/vim-clojure-highlight' -Plug 'guns/vim-clojure-static' -Plug 'tpope/vim-fireplace', { 'for': 'clojure' } +" Temporarily disabled since I'm not doing any Clojure work atm. +"Plug 'tpope/vim-classpath' " For Java +"Plug 'guns/vim-clojure-highlight' +"Plug 'guns/vim-clojure-static' +"Plug 'tpope/vim-fireplace', { 'for': 'clojure' } "//////////////////////////////////////////////////////////////// @@ -329,6 +324,9 @@ augroup campoCmds autocmd BufWritePost *.vim so $MYVIMRC autocmd BufWritePost vimrc.symlink so $MYVIMRC + " Generate ctags + au BufWritePost *.py,*.c,*.cpp,*.h silent! !eval 'ctags -R -o newtags; mv newtags tags' & + " Remove trailing whitespace on save all files. function! StripTrailingWhitespaces() let l = line(".") @@ -367,8 +365,8 @@ augroup END " MISC KEY MAPS """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Mapping ESC in insert mode and command mode to double i -"imap ii -"cmap ii +imap jj +"cmap ii " suspend process nmap z @@ -397,6 +395,7 @@ nmap x :x command! Q q " Bind :Q to :q command! Qall qall +command! Qa qall " Disable Ex mode map Q @@ -524,10 +523,17 @@ let g:localvimrc_ask = 0 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" noremap :TagbarToggle + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" CALENDAR +" GITGUTTER """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -let g:calendar_google_calendar = 1 + +let g:gitgutter_highlight_lines = 1 +nmap ha GitGutterStageHunk +nmap [h GitGutterNextHunk +nmap ]h GitGutterPrevHunk +" Run on file save. Realtime update is disabled in after/plugins/gitgutter.vim +autocmd BufWritePost * GitGutter """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " SYNTASTIC @@ -978,4 +984,4 @@ map n :call RenameFile() " Notes and other helpers map pn :sp ~/.dev-scratchpad -let g:autotagStopAt = "$HOME" +"let g:autotagStopAt = "$HOME"