Sat, 16 Jul 2016 00:01:47 -0400
fix up for reply/compose cursor pos
.vim/ftplugin/mail.vim | file | annotate | diff | comparison | revisions |
--- a/.vim/ftplugin/mail.vim +++ b/.vim/ftplugin/mail.vim @@ -1,16 +1,16 @@ -function IsReply() +function JumpAndInsert() if line('$') > 1 :/^$/ - :noh + :normal 2] :+1 + :exe 'startinsert' endif endfunction augroup mail_filetype autocmd! - autocmd VimEnter /tmp/mutt* :call IsReply() - autocmd VimEnter /tmp/mutt* :exe 'startinsert' + autocmd VimEnter /tmp/mutt* :call JumpAndInsert() augroup END setl textwidth=72