-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgvimrc
More file actions
128 lines (100 loc) · 2.85 KB
/
gvimrc
File metadata and controls
128 lines (100 loc) · 2.85 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
" detect operating system
let s:os = substitute(system('uname'), "\n", '', '')
" system PATH
if s:os ==? 'Darwin'
let $PATH = $HOME . '/bin:'
\. $HOME . '/local_install/usr/local/bin:'
\. $HOME . '/local_install/usr/lib/haskell/cabal/bin:'
\. $HOME . '/local_install/usr/lib/python/bin:'
\. $HOME . '/local_install/usr/lib/npm/bin:'
\. $HOME . '/.gems/bin:'
\. '/opt/local/libexec/gnubin:'
\. '/opt/local/sbin:'
\. '/opt/local/bin:'
\. $PATH
endif
" locale
let $LANG = 'en_US.UTF-8'
let $LC_ALL = 'en_US.UTF-8'
" environment path for external tools
" ruby
let $GEM_HOME = $HOME . '/.gems'
" python
"let $PIP_HOME = $HOME . '/local_install/python'
" npm
let $NPM_CONFIG_PREFIX = $HOME . '/local_install/npm'
" window size
set columns=88
set lines=44
"
" GUI font
"set guifont=Luxi\ Mono\ 11
"set guifont=Courier\ 10\ pitch\ 11
"set guifont=Courier\ New\ 10
"set guifont=Fixedus\ 10
"set guifont=Terminus\ 10
if s:os ==? 'Darwin'
"set guifont=Input:h17
set guifont=Essential\ PragmataPro:h18
elseif s:os ==? 'Linux'
"set guifont=Bitstream\ Vera\ Sans\ Mono\ 11
set guifont=JetBrains\ Mono\ 13
endif
"
" GUI options
" disable scrollbars
set guioptions -=l
set guioptions -=r
" disable left-hand scrollbar for vertically split window
set guioptions -=L
" disable right-hand scrollbar for vertically split window
set guioptions -=R
" disable toolbar
set guioptions -=T
" disable menu
set guioptions -=m
" use console dialogs instead of popup dialogs for simple choices.
set guioptions +=c
" disable gui tab line, use text tabline instead
set guioptions -=e
" disable cursor blinking
set guicursor+=a:blinkon0
" disable bell
set visualbell t_vb=
"
" plugins
" reload Ack because it checks PATH and exits if there is no g:ackprg available,
" which can be so on Darwin system because PATH is set in gvimrc, which is
" sourced after all plugins have been loaded
runtime plugin/ack.vim
"
" color shceme
colorscheme NeoSolarized
call MySetBG()
" set different cursor color when local keymap is used
highlight lCursor guifg=NONE guibg=Cyan
"
" custom tabs label
function GuiTabLabel()
let l:label = v:lnum
let l:label .= ') '
let l:bufnrlist = tabpagebuflist(v:lnum)
" Add '+' if one of the buffers in the tab page is modified
for l:bufnr in l:bufnrlist
if getbufvar(l:bufnr, '&modified')
let l:label = '+'.l:label
break
endif
endfor
" Append the number of windows in the tab page if more than one
let l:wincount = tabpagewinnr(v:lnum, '$')
if l:wincount > 1
let l:label .= l:wincount
endif
if l:label !=# ''
let l:label .= ' '
endif
" Append the buffer name
return l:label . pathshorten(bufname(l:bufnrlist[tabpagewinnr(v:lnum) - 1]))
endfunction
set guitablabel=%{GuiTabLabel()}