Add script and mapping to adjust font size

This commit is contained in:
Thomas Gideon 2018-10-12 17:12:07 -04:00
parent 4db0074dbc
commit 6dc4268e36

View file

@ -7,3 +7,16 @@ set guioptions-=r
set guioptions-=b
set guioptions-=T
set guioptions-=m
" from https://stackoverflow.com/a/51424640
let s:fontsize = 11
function! AdjustFontSize(amount)
let s:fontsize = s:fontsize+a:amount
:execute "GuiFont! DejaVu Sans Mono:h" . s:fontsize
endfunction
noremap <C-ScrollWheelUp> :call AdjustFontSize(1)<CR>
noremap <C-ScrollWheelDown> :call AdjustFontSize(-1)<CR>
inoremap <C-ScrollWheelUp> <Esc>:call AdjustFontSize(1)<CR>a
inoremap <C-ScrollWheelDown> <Esc>:call AdjustFontSize(-1)<CR>a