Permalink
Browse files

add some hax0r for fugitive

  • Loading branch information...
1 parent 07b3a25 commit 7f946dae4ad9b924c4b271b08108919236a78722 @scrooloose committed May 18, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 vimrc
View
12 vimrc
@@ -316,3 +316,15 @@ endfunction
"spell check when writing commit logs
autocmd filetype svn,*commit* set spell
+
+"http://vimcasts.org/episodes/fugitive-vim-browsing-the-git-object-database/
+"hacks from above (the url, not jesus) to delete fugitive buffers when we
+"leave them - otherwise the buffer list gets poluted
+"
+"add a mapping on .. to view parent tree
+autocmd BufReadPost fugitive://* set bufhidden=delete
+autocmd BufReadPost fugitive://*
+ \ if fugitive#buffer().type() =~# '^\%(tree\|blob\)$' |
+ \ nnoremap <buffer> .. :edit %:h<CR> |
+ \ endif
+

0 comments on commit 7f946da

Please sign in to comment.