-
Notifications
You must be signed in to change notification settings - Fork 0
/
gvimrc
39 lines (32 loc) · 1 KB
/
gvimrc
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
" somini.gvimrc
" Appearance {{{
" TODO: Single command that takes a number
command! FontSizeIncrease let &guifont = substitute(&guifont, '\d\+', '\=submatch(0)+1', '')
command! FontSizeDecrease let &guifont = substitute(&guifont, '\d\+', '\=submatch(0)-1', '')
"}}}
" Data Safety and Managing {{{
" Only on GUI vim, on terminals <C-s> will suspend the terminal
inoremap <silent> <C-s> <C-o>:write<CR>
"}}}
" Mouse {{{
set mousehide "Hide mouse when typing
" }}}
" Workarounds {{{
" Don't close windows by accident
nmap <C-w><C-c> <C-c>
" Map ALT to whatever you want
set winaltkeys=no
"}}}
" No menus nor toolbars {{{
set guioptions-=m guioptions-=T
set go-=r go-=R go-=l go-=L go-=b "No scrollbars
set guioptions-=t "Tear-off menus are too oldskool
set guioptions+=c " Don't use graphical prompts
"}}}
" Toggle menu and toolbar {{{
nnoremap <silent> <M-F1> :call SetToggle('guioptions','m')<CR>
nnoremap <silent> <M-F2> :call SetToggle('guioptions','T')<CR>
"}}}
" Modeline {{{
" vim:ft=vim:ts=2:sw=2:fdm=marker
"}}}