-
Notifications
You must be signed in to change notification settings - Fork 1
/
ginit.vim
26 lines (21 loc) · 850 Bytes
/
ginit.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
" neovim-qt specific options
if exists(':GuiFont')
let s:fontsize = 11
let s:font = "DejaVu Sans Mono"
" AdjustFontSize functionality taken from https://stackoverflow.com/a/51424640
function! AdjustFontSize(amount)
let s:fontsize = s:fontsize+a:amount
:execute "GuiFont! ". s:font . ":h". s:fontsize
endfunction
" change font size using mouse wheel
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
" pressing numpad's + and - changes the font size
noremap <kPlus> :call AdjustFontSize(1)<CR>
noremap <kMinus> :call AdjustFontSize(-1)<CR>
:execute "GuiFont! ". s:font . ":h". s:fontsize
GuiTabline 0
GuiPopupmenu 0
end