From: martin f. krafft Date: Sat, 17 May 2008 16:08:12 +0000 (+0100) Subject: fire off git commit diff split in ftplugin X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/1b55b99636b4cb239fa6c5f4a62ba820dac4580d?hp=d2fb1a0af994162971379eb3ee9e02ec0ec7249d fire off git commit diff split in ftplugin --- diff --git a/.vim/after/ftplugin/gitcommit.vim b/.vim/after/ftplugin/gitcommit.vim new file mode 100644 index 0000000..bfefe09 --- /dev/null +++ b/.vim/after/ftplugin/gitcommit.vim @@ -0,0 +1,3 @@ +" display the git-diff --cached in window below commit +" assumes nosplitbelow set. Might want to use wincmd p otherwise +DiffGitCached | wincmd J diff --git a/.vimrc b/.vimrc index 369851e..59409c3 100644 --- a/.vimrc +++ b/.vimrc @@ -1448,10 +1448,6 @@ colorscheme madduck autocmd BufNewFile,BufRead /etc/logcheck/*.d*/* set tw=0 autocmd BufNewFile,BufRead /home/madduck/debian/pkg/logcheck/*/rulefiles/linux/*.d*/* set tw=0 -" display the git-diff --cached in window below commit -" assumes nosplitbelow set. Might want to use wincmd p otherwise -autocmd FileType gitcommit DiffGitCached | wincmd J - " jump to last known position in file (:he last-position-jump) autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"zz" | endif