~gpanders/dotfiles

12291d3163062a0a3c879f53a0b0d02541376ca4 — Greg Anders 2 years ago f6b89e9
[vim] Make git commit buffers in vim always start at line 1
1 files changed, 9 insertions(+), 4 deletions(-)

M vim/.vim/after/ftplugin/gitcommit.vim
M vim/.vim/after/ftplugin/gitcommit.vim => vim/.vim/after/ftplugin/gitcommit.vim +9 -4
@@ 2,13 2,18 @@ if &filetype !=# 'gitcommit'
  finish
endif

setlocal colorcolumn=73
" enable spell check
setlocal spell
setlocal textwidth=72

" warning if first line too long
match ErrorMsg /\%1l.\%>51v/

" enable spell check
setlocal spell
augroup gitcommit_ftplugin
  autocmd! * <buffer>
  autocmd BufWinEnter <buffer> normal gg0
augroup END

let b:undo_ftplugin .= '|setl tw< spell<'
let b:undo_ftplugin .= '|exe "au! gitcommit_ftplugin * <buffer>"'

let b:undo_ftplugin .= '|setl cc< tw<'