summaryrefslogtreecommitdiff
path: root/ginit.gtk.vim
diff options
context:
space:
mode:
authorIan Griffin <migriffin@disroot.org>2023-12-28 17:06:53 +0800
committerIan Griffin <migriffin@disroot.org>2023-12-28 17:06:53 +0800
commit93e008c73586b239b2e11ad897c4bda081c023d7 (patch)
tree5b04a52270f15b2d469b84350fa97fa6ee31c0a5 /ginit.gtk.vim
parent0f73cb3fed54b16791cca87271e436b23f62c817 (diff)
updates
Diffstat (limited to 'ginit.gtk.vim')
-rw-r--r--ginit.gtk.vim40
1 files changed, 40 insertions, 0 deletions
diff --git a/ginit.gtk.vim b/ginit.gtk.vim
new file mode 100644
index 0000000..d98f71f
--- /dev/null
+++ b/ginit.gtk.vim
@@ -0,0 +1,40 @@
+""
+"" Misc.
+""
+set termguicolors
+set background=light
+hi ColorColumn guibg=#deddda
+
+call rpcnotify(1, 'Gui', 'Option', 'Popupmenu', 0)
+call rpcnotify(1, 'Gui', 'Option', 'Tabline', 0)
+call rpcnotify(1, 'Gui', 'Command', 'SetCursorBlink', '0')
+""
+"" 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