-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathgvimrc
More file actions
70 lines (54 loc) · 1.62 KB
/
gvimrc
File metadata and controls
70 lines (54 loc) · 1.62 KB
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
" color jellybeans
" set gfn=DejaVu\ Sans\ Mono\ 12
" no bells please
set noeb vb t_vb=
if has("win32")
set nolist
set gfn=Inconsolata-g\ for\ Powerline:h11:cANSI
au GUIEnter * simalt ~x
elseif has("gui_macvim")
set gfn=Monaco\ for\ Powerline:h16
else
set gfn=Inconsolata-g\ for\ Powerline:h12
endif
set guioptions-=T " no toolbar
set guioptions-=r " no right scrollbar
set guioptions-=L " no left scrollbar
set guioptions-=m " no menu
set lines=43
function! FullscreenToggle()
exe "!wmctrl -r ".v:servername." -b toggle,fullscreen"
endfunct:ion
" Bind full screen toggle key
command! FullscreenToggle :call FullscreenToggle()
map <C-F11> :FullscreenToggle<CR>
let s:pattern = '^\(.* \)\([1-9][0-9]*\)$'
let s:minfontsize = 6
let s:maxfontsize = 16
function! AdjustFontSize(amount)
if has("gui_gtk2") && has("gui_running")
let fontname = substitute(&guifont, s:pattern, '\1', '')
let cursize = substitute(&guifont, s:pattern, '\2', '')
let newsize = cursize + a:amount
if (newsize >= s:minfontsize) && (newsize <= s:maxfontsize)
let newfont = fontname . newsize
let &guifont = newfont
endif
else
echoerr "You need to run the GTK2 version of Vim to use this function."
endif
endfunction
if has("gui_gtk2") && has("gui_running")
function! LargerFont()
call AdjustFontSize(1)
endfunction
command! LargerFont call LargerFont()
function! SmallerFont()
call AdjustFontSize(-1)
endfunction
command! SmallerFont call SmallerFont()
map + :LargerFont<CR>
map - :SmallerFont<CR>
endif
" set gfn=Inconsolata-g\ for\ Powerline:h10:cANSI
highlight Search guibg='peru' guifg='black'