Permalink
Browse files

Add more Leader remappings; Whitespace F5;

* Move between split panes more gracefully
* Leader keys for git messaging
  • Loading branch information...
Adarsh Pandit
Adarsh Pandit committed Aug 20, 2012
1 parent 2aecb06 commit 8f0f746cac38d237f3f9c402296ef2eff5edc092
Showing with 15 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +14 −0 vimrc
View
@@ -0,0 +1 @@
+.netrwhist
View
14 vimrc
@@ -40,6 +40,9 @@ set expandtab
" Display extra whitespace
set list listchars=tab:»·,trail:·
+" Remove trailing whitespace
+nnoremap <silent> <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>:retab<CR>
+
" Local config
" if filereadable(".vimrc.local")
" source .vimrc.local
@@ -115,3 +118,14 @@ set clipboard=unnamed
" Opens new panes to right/bottom, which is more natural
set splitbelow
set splitright
+
+" Buffer navigation more naturally
+nnoremap <C-J> <C-W><C-J>
+nnoremap <C-K> <C-W><C-K>
+nnoremap <C-L> <C-W><C-L>
+nnoremap <C-H> <C-W><C-H>
+
+" Git
+nnoremap <Leader>gc :Gcommit -m ""<LEFT>
+nnoremap <Leader>gcv :Gcommit -v<CR>
+nnoremap <Leader>ga :Git add .<CR>

0 comments on commit 8f0f746

Please sign in to comment.