-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathgvimrc
More file actions
68 lines (59 loc) · 1.48 KB
/
gvimrc
File metadata and controls
68 lines (59 loc) · 1.48 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
set guioptions-=m " 隐藏菜单栏
set guioptions-=T " 隐藏工具栏
" 隐藏左、右、底部滚动条
set guioptions-=L
set guioptions-=r
set guioptions-=b
set gcr=a:block-blinkon0 " 光标不闪烁
set novisualbell
set fileencodings=utf-8
" identify platform functions
silent function! MAC_OS()
return has('macunix')
endfunction
silent function! LINUX()
return has('unix') && !has('macunix') && !has('win32unix')
endfunction
if MAC_OS()
set guifont=Menlo:h16
" ⌘ + ⌥ + ←/→ move tabs to the left/right
noremap <D-M-Left> :-tabmove<cr>
noremap <D-M-Right> :+tabmove<cr>
map <D-1> 1gt
map <D-2> 2gt
map <D-3> 3gt
map <D-4> 4gt
map <D-5> 5gt
map <D-6> 6gt
map <D-7> 7gt
map <D-8> 8gt
map <D-9> 9gt
map <D-0> :tablast<CR>
" resize window
nnoremap <silent> = :resize +8<CR>
nnoremap <silent> - :resize -8<CR>
nnoremap <silent> + :vertical resize +10<cr>
nnoremap <silent> _ :vertical resize -10<cr>
" nnoremap <silent> = :exe "resize " . (winheight(0) * 4/3)<CR>
" nnoremap <silent> - :exe "resize " . (winheight(0) * 2/3)<CR>
elseif LINUX()
set guifont=Ubuntu\ Mono\ Regular\ 14
" MetaKey + number to switch tabs
map <M-1> 1gt
map <M-2> 2gt
map <M-3> 3gt
map <M-4> 4gt
map <M-5> 5gt
map <M-6> 6gt
map <M-7> 7gt
map <M-8> 8gt
map <M-9> 9gt
map <M-0> :tablast<CR>
" copy & paste with system clipboard
vmap <C-x> "+c
vmap <C-c> "+y
vmap <C-v> c<ESC>"+p
inoremap <C-v> <C-r><C-o>+
map <M-s> :w<CR>
map <M-x> :x<CR>
endif