-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathginit.vim
More file actions
27 lines (25 loc) · 810 Bytes
/
ginit.vim
File metadata and controls
27 lines (25 loc) · 810 Bytes
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
27
let s:fontsize = 10
if exists("g:neovide")
set guifont=CaskaydiaCove\ Nerd\ Font:h10
else
set guifont=CaskaydiaCove\ NF\ Semibold:h10
endif
function! AdjustFontSize(amount)
let s:fontsize = s:fontsize+a:amount
if exists("g:neovide")
:execute "set guifont=CaskaydiaCove\\ Nerd\\ Font:h" . s:fontsize
else
:execute "GuiFont! Cascadia\\ Mono:h" . s:fontsize
endif
endfunction
fu! AdjustOpacity(amount)
if exists("g:neovide")
:execute "lua vim.g.neovide_opacity = 0." . a:amount
else
:execute "GuiWindowOpacity 0." . a:amount
end
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