update ginit

Wed, 22 Feb 2023 12:40:39 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 22 Feb 2023 12:40:39 -0600
changeset 1042
0d793459267d
parent 1041
99ab96c49f65
child 1043
e55463fb35e2

update ginit

.config/nvim/ginit.vim file | annotate | diff | comparison | revisions
old mode 100755
new mode 100644
--- a/.config/nvim/ginit.vim
+++ b/.config/nvim/ginit.vim
@@ -1,12 +1,23 @@
-
-set number
-set guifont=DejaVu\ Sans\ Mono:h10
-set linespace=0
-
-if exists("g:fvim_loaded")
-  set guifont=DejaVu\ Sans\ Mono:h13
-  FVimFontLineHeight "+1.0"
-
-  nnoremap <A-CR> :FVimToggleFullScreen<CR>
-endif
-
+set number
+set guifont=DejaVu\ Sans\ Mono:h10
+set linespace=0
+
+if exists("g:fvim_loaded")
+  " sizes are inconsistent... doesn't autoadjust for dpi? vimresize event not
+  " fired?
+  if g:fvim_os == "windows"
+    set guifont=DejaVu\ Sans\ Mono:h13
+    FVimFontLineHeight "+1.0"
+  elseif g:fvim_render_scale > 1.0
+    set guifont=DejaVu\ Sans\ Mono:h11
+  else
+    set guifont=DejaVu\ Sans\ Mono:h10
+  endif
+
+  " These take a ton of scroll events to trigger, it's easier with the touchpad?
+  nnoremap <silent> <C-ScrollWheelUp> :set guifont=+<CR>
+  nnoremap <silent> <C-ScrollWheelDown> :set guifont=-<CR>
+
+  nnoremap <A-CR> :FVimToggleFullScreen<CR>
+endif
+

mercurial