vim: Drop textwidth autocmd for native way
Instead of needing a manual autocmd that triggers on textwidth changes, colorcolumn supports offsets to textwidth natively.
This commit is contained in:
@@ -42,9 +42,9 @@ else
|
|||||||
nmap cW dWi
|
nmap cW dWi
|
||||||
endif
|
endif
|
||||||
" Highlight current line
|
" Highlight current line
|
||||||
" set cursorline
|
"set cursorline
|
||||||
" Show ruler at &textwidth columns
|
" Show ruler at column behind &textwidth
|
||||||
let &colorcolumn=&textwidth
|
set colorcolumn=+1
|
||||||
" Show menu for possible matches when using command-line completing.
|
" Show menu for possible matches when using command-line completing.
|
||||||
if (has('wildmenu'))
|
if (has('wildmenu'))
|
||||||
set wildmenu
|
set wildmenu
|
||||||
|
|||||||
@@ -57,9 +57,6 @@ endif
|
|||||||
" Custom bindings when debugging
|
" Custom bindings when debugging
|
||||||
autocmd SourcePost termdebug.vim tnoremap <Esc> <C-\><C-n>
|
autocmd SourcePost termdebug.vim tnoremap <Esc> <C-\><C-n>
|
||||||
|
|
||||||
" Adjust the colorcolumn together with &textwidth
|
|
||||||
autocmd OptionSet textwidth exec 'set cc-=' . v:option_old . ' | set cc+=' . &tw
|
|
||||||
"
|
|
||||||
" Highlight word under cursor
|
" Highlight word under cursor
|
||||||
augroup highlight_current_word
|
augroup highlight_current_word
|
||||||
au!
|
au!
|
||||||
|
|||||||
Reference in New Issue
Block a user