chore(vim): add custom function to show colorline

This commit is contained in:
Stefan Imhoff
2021-12-11 14:13:30 +01:00
parent 3775d920bc
commit 3378f6d568

View File

@@ -19,6 +19,21 @@ function! ToggleWrap()
endif endif
endfunction endfunction
" Toggle between soft wrap and no wrap
nnoremap <leader>cw :call ToggleColorColumn()<CR>
function! ToggleColorColumn()
if &colorcolumn == "80"
echo "Textwidth OFF"
set colorcolumn=0
set textwidth=0
else
echo "Textwidth ON"
set colorcolumn=80
set textwidth=80
endif
endfunction
" Automatic Tabular.vim with the (|) " Automatic Tabular.vim with the (|)
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a