Echo widths and add S-F11 to toggle margins

Some terminals use F11 for Full Screen (Windows Terminal for example).
Add S-F11 so we can use this function without needing to mess with
terminal settings.
This commit is contained in:
Anthony Rose 2023-05-15 08:39:47 +01:00
parent e1b5c21c6b
commit c66ffd3382

2
vimrc
View file

@ -44,6 +44,7 @@ nnoremap <F2> :call ACPActodoTodo()<CR>
nnoremap <F3> :NERDTreeToggle<CR> nnoremap <F3> :NERDTreeToggle<CR>
nnoremap <F4> :vsplit<CR> nnoremap <F4> :vsplit<CR>
nnoremap <F7> :call ACPToggleSpellEnUs()<CR> nnoremap <F7> :call ACPToggleSpellEnUs()<CR>
nnoremap <S-F11> :call ACPToggleMargins()<CR>
nnoremap <S-F2> :call ACPAdocTodo()<CR> nnoremap <S-F2> :call ACPAdocTodo()<CR>
nnoremap <S-F4> :split<CR> nnoremap <S-F4> :split<CR>
nnoremap <S-F7> :call ACPToggleSpellEnGb()<CR> nnoremap <S-F7> :call ACPToggleSpellEnGb()<CR>
@ -152,6 +153,7 @@ if has('eval')
function! ACPToggleMargins() function! ACPToggleMargins()
execute "set colorcolumn=" . (&colorcolumn == "0" ? "73,81" : (&colorcolumn == "73,81" ? "101" : "0")) execute "set colorcolumn=" . (&colorcolumn == "0" ? "73,81" : (&colorcolumn == "73,81" ? "101" : "0"))
execute "set textwidth=" . (&colorcolumn == "101" ? "100" : "80") execute "set textwidth=" . (&colorcolumn == "101" ? "100" : "80")
echo "tw=" . &textwidth . " & cc=" . &colorcolumn
endfunction endfunction
function! ACPToggleSpellEnUs() function! ACPToggleSpellEnUs()