-
Notifications
You must be signed in to change notification settings - Fork 22
/
gvimrc
87 lines (65 loc) · 2.18 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
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
set lines=90 columns=230
set background=light
colorscheme seagull
set guioptions-=T " Hide the menu bar
set guioptions+=c " Use console dialgs
set cmdheight=2 " Make command line two lines high
set mousehide " Hide the mouse when typing text
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GUI Options
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set gfn=Meslo\ LG\ S\ DZ\ for\ Powerline:h11.00
set antialias " MacVim: smooth fonts.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" MacVim Options
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("gui_macvim")
" Save all open buffers when MacVim loses focus
au FocusLost * wa
" Fullscreen takes up entire screen
set fuoptions=maxhorz,maxvert
" bind command-] to shift right
nmap <D-]> >>
vmap <D-]> >>
imap <D-]> <C-O>>>
" bind command-[ to shift left
nmap <D-[> <<
vmap <D-[> <<
imap <D-[> <C-O><<
"custom tab stuff
" tab navigation like safari
" idea adopted from: [[VimTip1221]]
nmap <D-[> :tabprevious<CR>
nmap <D-]> :tabnext<CR>
map <D-[> :tabprevious<CR>
map <D-]> :tabnext<CR>
imap <D-[> <Esc>:tabprevious<CR>i
imap <D-]> <Esc>:tabnext<CR>i
nmap <D-t> :tabnew<CR>
imap <D-t> <Esc>:tabnew<CR>
" open tabs with command-<tab number>
map <D-S-]> gt
map <D-S-[> gT
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>
" Enable default OS X shift-movement/replacement behavior
" let macvim_hig_shift_movement = 1
" Activate spelling support, via https://twitter.com/b4winckler/status/58584667200303104
" Enables Cmd-; and Cmd-:
set spell
set macmeta
end
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Local config
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if filereadable($HOME . "/.gvimrc.local")
source ~/.gvimrc.local
endif