Answer the question
In order to leave comments, you need to log in
How to adjust scaling in Gvim?
Good afternoon!
I am mastering gvim, but I lack the ability to quickly change the scale (font size) using Ctrl + scroll (as in geany).
Please tell me if this is possible in gvim
Answer the question
In order to leave comments, you need to log in
Most likely, there is no built-in one, but it is not difficult to make your own version. Below is a rather crude version, parsing the font specification from the option 'guifont'
using a regular expression and increasing/decreasing the size specified there.
Paste the following snippet into .vimrc
a file, or create one plugin/mouse-font.vim
specifically for this:
" change font size on Ctrl + mouse wheel
if has('gui_running')
function! s:ChangeFont(delta)
let l:expr = '\=submatch(1)+' . a:delta
let l:font = substitute(&guifont, '\v(\d+)', l:expr, '')
let &guifont = l:font
endfunction
nnoremap <silent> <C-ScrollWheelUp> :call <SID>ChangeFont(+1)<cr>
nnoremap <silent> <C-ScrollWheelDown> :call <SID>ChangeFont(-1)<cr>
endif
:help <что-нибудь>
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question