-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathginit.vim
86 lines (70 loc) · 1.99 KB
/
ginit.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
" Enable Mouse
set mouse=a
" tnoremap <Esc> <C-\><C-n>
"
"
let g:VM_show_warnings = 0
nnoremap <Tab> <Esc>
let s:fontsize = 14
function! AdjustFontSize(amount)
echom "AdjustFontSize"
let s:fontsize = s:fontsize + a:amount
" let fontname = "CaskaydiaCove\ NF:h" . s:fontsize
let fontname = "JetBrainsMono\ Nerd\ Font:h" . s:fontsize
execute "GuiFont! " . fontname
endfunction
function! ResetFont()
echom "ResetFont"
execute "GuiFont! JetBrainsMono Nerd Font:h14"
endfunction
" Set Editor Font
if exists(':GuiFont')
noremap <C-ScrollWheelUp> :call AdjustFontSize(1)<CR>
noremap <C-ScrollWheelDown> :call AdjustFontSize(-1)<CR>
inoremap <C-ScrollWheelUp> <Esc>:call AdjustFontSize(1)<CR>a
inoremap <C-ScrollWheelDown> <Esc>:call AdjustFontSize(-1)<CR>a
" Ctrl + Dash
noremap <C--> :call AdjustFontSize(-1)<CR>
" Ctrl + Equals (Plus)
noremap <C-=> :call AdjustFontSize(1)<CR>
" Ctrl + Equals (Plus)
" Use GuiFont! to ignore font errors
GuiFont! CaskaydiaCove\ NF:h12
inoremap <silent> <S-Insert> <C-R>+
cnoremap <S-Insert> <C-R>+
endif
" Disable GUI Tabline
if exists(':GuiTabline')
GuiTabline 0
endif
" Disable GUI Popupmenu
if exists(':GuiPopupmenu')
GuiPopupmenu 0
endif
" Enable GUI ScrollBar
if exists(':GuiScrollBar')
GuiScrollBar 1
endif
"
if exists(':GuiWindowOpacity')
GuiWindowOpacity 0.98
endif
" Right Click Context Menu (Copy-Cut-Paste)
if exists(':GuiPopupmenu')
nnoremap <silent><RightMouse> :call GuiShowContextMenu()<CR>
inoremap <silent><RightMouse> <Esc>:call GuiShowContextMenu()<CR>
xnoremap <silent><RightMouse> :call GuiShowContextMenu()<CR>gv
snoremap <silent><RightMouse> <C-G>:call GuiShowContextMenu()<CR>gvgv
endif
" if has("persistent_undo")
" let target_path = expand('~/.undodir')
"
" " create the directory and any parent directories
" " if the location does not exist.
" if !isdirectory(target_path)
" call mkdir(target_path, "p", 0700)
" endif
"
" let &undodir=target_path
" set undofile
" endif