mirror of
https://github.com/lloeki/vimfiles.git
synced 2025-12-06 05:24:39 +01:00
overlength highlight refactoring
This commit is contained in:
parent
04524a4ceb
commit
fb0d4e94e8
1 changed files with 8 additions and 4 deletions
12
vimrc
12
vimrc
|
|
@ -76,12 +76,16 @@ autocmd FileType coffee set softtabstop=4 shiftwidth=4
|
||||||
au BufRead,BufNewFile Guardfile setfiletype ruby
|
au BufRead,BufNewFile Guardfile setfiletype ruby
|
||||||
"let g:syntastic_ruby_checkers = ['mri', 'rubocop']
|
"let g:syntastic_ruby_checkers = ['mri', 'rubocop']
|
||||||
|
|
||||||
"notify line length > 80
|
"notify line over length
|
||||||
function HighlightOverLength()
|
function HighlightOverLength(len)
|
||||||
highlight OverLength ctermbg=blue ctermfg=white guibg=#59292
|
highlight OverLength ctermbg=blue ctermfg=white guibg=#59292
|
||||||
match OverLength /\%81v.\+/
|
execute 'match OverLength /\%'.(a:len+1).'v.\+/'
|
||||||
endfunction
|
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
|
"swap/undo files
|
||||||
set dir=~/.vim/tmp/swap//,/var/tmp//,/tmp//,.
|
set dir=~/.vim/tmp/swap//,/var/tmp//,/tmp//,.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue