blob: 51b89e872df94910fd34cabeec095234546a25a2 (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
""
"" Misc.
""
set termguicolors
GuiScrollBar 0
GuiTabline 0
GuiRenderLigatures 0
"" get colorscheme from gtk
let gtk_colorscheme = substitute(system('gsettings get org.gnome.desktop.interface color-scheme'), '\n', '', '')
if gtk_colorscheme == "'prefer-dark'"
set background=dark
else
set background=light
"" hi ColorColumn guibg=#c0bfbc
endif
""
"" Font Setup
""
"" parameters
let s:defaultfontsize = 10
let s:fontname = "RobotoMono Nerd Font [GOOG]"
"" set default font
:execute "Guifont " . s:fontname . ":h" . s:defaultfontsize
"" increase/decrease font size function
let s:fontsize = s:defaultfontsize
function! AdjustFontSize(amount)
let s:fontsize = s:fontsize+a:amount
:execute "Guifont " . s:fontname . ":h" . s:fontsize
endfunction
"" reset font size
function! ResetFontSize()
:execute "Guifont " . s:fontname . ":h" . s:defaultfontsize
endfunction
"" font size keybindings
noremap <C-S-+> :call AdjustFontSize(1)<CR>
noremap <C-S-_> :call AdjustFontSize(-1)<CR>
noremap <C-S-)> :call ResetFontSize()<CR>
inoremap <C-S-+> <Esc>:call AdjustFontSize(1)<CR>a
inoremap <C-S-_> <Esc>:call AdjustFontSize(-1)<CR>a
inoremap <C-S-)> <Esc>:call ResetFontSize()<CR>a
|