-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gvimrc
52 lines (42 loc) · 1.22 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
40
41
42
43
44
45
46
47
48
49
50
51
52
" Font for gui
" set guifont=Inconsolata\ 11
set guifont=DejaVu\ Sans\ Mono\ 9
" set linespace=1
set guioptions-=R
set guioptions-=r
set guioptions-=l
set guioptions-=L
set guioptions-=T
set guioptions-=m
set guioptions+=c
" Paste SELECTION with S-Insert
inoremap <S-Insert> <MiddleMouse>
cnoremap <S-Insert> <MiddleMouse>
" font size
command! -bar -nargs=0 Bigger :let &guifont = substitute(&guifont,'\d\+$','\=submatch(0)+1','')
command! -bar -nargs=0 Smaller :let &guifont = substitute(&guifont,'\d\+$','\=submatch(0)-1','')
noremap <M--> :Smaller<CR>
noremap <M-=> :Bigger<CR>
" Tab tooltip format
set gtt=%F
set vb t_vb= " no visual nor audio bell
" exe "colors " . colors_name
colors Sunburst
" colors Twilight
" colors Monokai
" colors jellybeans
" set background=dark
" colors solarized
autocmd VimEnter * call s:CdIfDirectory(expand("<amatch>"))
" If the parameter is a directory, cd into it
function! s:CdIfDirectory(directory)
let explicitDirectory = isdirectory(a:directory)
let directory = explicitDirectory || empty(a:directory)
if explicitDirectory
exe "cd " . a:directory
endif
endfunction
" Load local config
if filereadable(expand("~/.gvimrc.local"))
source ~/.gvimrc.local
endif