Add colorcolumn for wide columns

This commit is contained in:
Anthony Rose 2023-04-21 11:20:38 +01:00
parent 195a6e07fe
commit 8302cc216a

5
vimrc
View file

@ -41,6 +41,7 @@ nnoremap <F11> :call ACPToggleMargins()<CR>
nnoremap <F12> :w<CR> nnoremap <F12> :w<CR>
nnoremap <F2> :call ACPActodoTodo()<CR> nnoremap <F2> :call ACPActodoTodo()<CR>
nnoremap <F7> :call ACPToggleSpellEnUs()<CR> nnoremap <F7> :call ACPToggleSpellEnUs()<CR>
nnoremap <S-F11> :call ACPToggleWideMargins()<CR>
nnoremap <S-F2> :call ACPAdocTodo()<CR> nnoremap <S-F2> :call ACPAdocTodo()<CR>
nnoremap <S-F7> :call ACPToggleSpellEnGb()<CR> nnoremap <S-F7> :call ACPToggleSpellEnGb()<CR>
nnoremap <down> <nop> nnoremap <down> <nop>
@ -150,6 +151,10 @@ if has('eval')
execute "set colorcolumn=" . (&colorcolumn == "0" ? "73,81" : "0") execute "set colorcolumn=" . (&colorcolumn == "0" ? "73,81" : "0")
endfunction endfunction
function! ACPToggleWideMargins()
execute "set colorcolumn=" . (&colorcolumn == "0" ? "121" : "0")
endfunction
function! ACPToggleSpellEnUs() function! ACPToggleSpellEnUs()
if &spell == 0 if &spell == 0
setlocal spell spelllang=en_us setlocal spell spelllang=en_us