Initial commit
This commit is contained in:
commit
d733c49ffb
30
ginit.vim
Normal file
30
ginit.vim
Normal file
@ -0,0 +1,30 @@
|
||||
let s:default_fontsize = 11
|
||||
let s:fontsize = s:default_fontsize
|
||||
let s:font = "Monospace Regular"
|
||||
" GuiLinespace 2
|
||||
|
||||
function! SetFont() abort
|
||||
if exists('g:GtkGuiLoaded')
|
||||
call rpcnotify(1, 'Gui', 'Font', s:font . ' ' . s:fontsize)
|
||||
else
|
||||
exec "GuiFont " . s:font . ":h" . s:fontsize
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call SetFont()
|
||||
|
||||
function! AdjustFontSize(delta)
|
||||
let s:fontsize += a:delta
|
||||
call SetFont()
|
||||
endfunction
|
||||
|
||||
function! ResetFontSize()
|
||||
let s:fontsize = s:default_fontsize
|
||||
call SetFont()
|
||||
endfunction
|
||||
|
||||
nnoremap <C-=> :call AdjustFontSize(1)<CR>
|
||||
nnoremap <C-+> :call AdjustFontSize(1)<CR>
|
||||
nnoremap <C--> :call AdjustFontSize(-1)<CR>
|
||||
nnoremap <C-0> :call ResetFontSize()<CR>
|
||||
|
Loading…
Reference in New Issue
Block a user