diff options
| author | Ian Griffin <migriffin@disroot.org> | 2023-12-28 17:06:53 +0800 |
|---|---|---|
| committer | Ian Griffin <migriffin@disroot.org> | 2023-12-28 17:06:53 +0800 |
| commit | 93e008c73586b239b2e11ad897c4bda081c023d7 (patch) | |
| tree | 5b04a52270f15b2d469b84350fa97fa6ee31c0a5 /ginit.vim | |
| parent | 0f73cb3fed54b16791cca87271e436b23f62c817 (diff) | |
updates
Diffstat (limited to 'ginit.vim')
| -rw-r--r-- | ginit.vim | 52 |
1 files changed, 45 insertions, 7 deletions
@@ -1,9 +1,47 @@ -"" Font Setup -Guifont SauceCodePro\ Nerd\ Font\ Mono:h10 -"GuiRenderLigatures 1 -GuiScrollBar 1 +"" +"" Misc. +"" +set termguicolors +GuiScrollBar 0 GuiTabline 0 +GuiRenderLigatures 0 -"" Colorscheme -set background=dark -set termguicolors +"" 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 |
