From fb0d4e94e8e880133695fc5e5c390cf0a3269cad Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Wed, 26 Jun 2013 22:58:59 +0200 Subject: [PATCH] overlength highlight refactoring --- vimrc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vimrc b/vimrc index 11ed753..1630fff 100644 --- a/vimrc +++ b/vimrc @@ -76,12 +76,16 @@ autocmd FileType coffee set softtabstop=4 shiftwidth=4 au BufRead,BufNewFile Guardfile setfiletype ruby "let g:syntastic_ruby_checkers = ['mri', 'rubocop'] -"notify line length > 80 -function HighlightOverLength() +"notify line over length +function HighlightOverLength(len) highlight OverLength ctermbg=blue ctermfg=white guibg=#59292 - match OverLength /\%81v.\+/ + execute 'match OverLength /\%'.(a:len+1).'v.\+/' endfunction -autocmd FileType ruby call HighlightOverLength() +autocmd FileType vim call HighlightOverLength(79) +autocmd FileType ruby call HighlightOverLength(79) +autocmd FileType slim call HighlightOverLength(79) +autocmd FileType python call HighlightOverLength(79) +autocmd FileType mdown call HighlightOverLength(79) "swap/undo files set dir=~/.vim/tmp/swap//,/var/tmp//,/tmp//,.