From dba7f779be76d7be97d31bf11da3c6abc7141401 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sat, 18 Mar 2017 14:35:03 +0000 Subject: [PATCH] Force newline after n characters --- vim/vimrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index 7ec5402..dc2942e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -142,6 +142,12 @@ set expandtab "set shiftwidth=2 "set tabstop=2 +" Force the cursor onto a new line after 80 characters +set textwidth=80 +set colorcolumn=81 +" However, in Git commit messages, let’s make it 72 characters +autocmd FileType gitcommit set textwidth=72 +autocmd FileType gitcommit set colorcolumn=73 "------------------------------------------------------------ " Mappings {{{1