This commit is contained in:
2023-12-28 17:06:53 +08:00
parent 0f73cb3fed
commit 93e008c735
9 changed files with 230 additions and 160 deletions

View File

@@ -1,9 +1,47 @@
"" Font Setup
Guifont SauceCodePro\ Nerd\ Font\ Mono:h10
"GuiRenderLigatures 1
GuiScrollBar 1
GuiTabline 0
"" Colorscheme
set background=dark
""
"" 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 = "Source Code Pro"
"" 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