From: R. Steve McKown Date: Wed, 10 Jun 2015 14:22:53 +0000 (-0600) Subject: Set a textwidth for plain text files X-Git-Url: https://oss.titaniummirror.com/gitweb?p=smckown%2Fdotfiles.git;a=commitdiff_plain;h=eefc930bbf39f7bd5c2571802086719298568529 Set a textwidth for plain text files --- diff --git a/vim/vimrc b/vim/vimrc index d169f51..5bdef27 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -80,6 +80,8 @@ if has("autocmd") autocmd filetype c,cpp,java setlocal tw=80 fo-=t fo+=j autocmd filetype nesc setlocal syntax=c.doxygen tw=80 fo-=t fo+=j + autocmd BufReadPre *.txt,README*,TODO*,INSTALL* setlocal tw=80 fo-=t fo+=j + " Whitelist for auto-stripping trailing whitespace on buffer write autocmd BufWritePre *.c,*.h,*.nesc,*.py,*.java,*.sh,make :call StripTrailingWhitespace()