vim:autocmd: Reset textwidth value in colorcolumn
Instead of overwriting the entire colorcolumn value, reset only the textwidth value, by subtracting it first and then readding it.
This commit is contained in:
@@ -58,7 +58,7 @@ endif
|
||||
autocmd SourcePost termdebug.vim tnoremap <Esc> <C-\><C-n>
|
||||
|
||||
" Adjust the colorcolumn together with &textwidth
|
||||
autocmd OptionSet textwidth let &colorcolumn=&textwidth
|
||||
autocmd OptionSet textwidth exec 'set cc=' . v:option_old . ' | set cc+=' . &tw
|
||||
"
|
||||
" Highlight word under cursor
|
||||
augroup highlight_current_word
|
||||
|
||||
Reference in New Issue
Block a user