diff options
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 |
