-
Notifications
You must be signed in to change notification settings - Fork 0
/
_gvimrc
41 lines (33 loc) · 925 Bytes
/
_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
40
set guioptions+=!
set guifont=Consolas:h10
" set guifontwide=MingLiU:h10
set background=dark
" source $VIMRUNTIME/vimrc_example.vim
" colorscheme solarized
" colorscheme gruvbox
colorscheme dracula
" colorscheme gotham
" colorscheme iceberg
" change guitablabel
function GuiTabLabel()
let label = ''
" add tab number
let label .= v:lnum . ') '
let bufnrlist = tabpagebuflist(v:lnum)
" Append the number of windows in the tab page if more than one
let wincount = tabpagewinnr(v:lnum, '$')
if wincount > 1
let label .= wincount . ': '
endif
" Add '+' if one of the buffers in the tab page is modified
for bufnr in bufnrlist
if getbufvar(bufnr, "&modified")
let label .= '+'
break
endif
endfor
" Append the buffer name
return label . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1])
endfunction
set guitablabel=%{GuiTabLabel()}
au GUIEnter * simalt ~x " start gvim maximized (only works on windows)