Add script and mapping to adjust font size
This commit is contained in:
parent
4db0074dbc
commit
6dc4268e36
1 changed files with 13 additions and 0 deletions
13
ginit.vim
13
ginit.vim
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue