summaryrefslogtreecommitdiffstats
path: root/vim/ftplugin/gitcommit.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/ftplugin/gitcommit.vim')
-rw-r--r--vim/ftplugin/gitcommit.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/vim/ftplugin/gitcommit.vim b/vim/ftplugin/gitcommit.vim
index 4c25752..b1c1450 100644
--- a/vim/ftplugin/gitcommit.vim
+++ b/vim/ftplugin/gitcommit.vim
@@ -1,5 +1,9 @@
setlocal viminfo=
augroup local_gitcommit
autocmd!
- autocmd BufWinEnter <buffer> exe "normal! ggO" | startinsert
+ autocmd BufWinEnter <buffer>
+ \ if getline(1) == '' |
+ \ exe "normal! ggO" |
+ \ startinsert |
+ \ endif
augroup END