forked from arunthampi/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgvimrc
80 lines (67 loc) · 1.75 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
if has("gui_running")
"------------------------------------------------------------------------------
" basic settings
"
colorscheme railscasts
set guifont=Menlo:h13
set guioptions-=T " remove tool bar
set clipboard+=unnamed " yanks go to clipboard
if has("autocmd")
autocmd VimResized * wincmd = " resize buffers when window is resized
"if exists("g:autosave_on_blur")
"au FocusLost * silent! wall " autosave on blur if enabled
"endif
endif
if has("gui_macvim")
macmenu &File.New\ Tab key=<D-s-t> " remap new tab
macmenu &File.Open\ Tab\.\.\. key=<nop>
endif
"------------------------------------------------------------------------------
" mappings
" https://raw.github.com/carlhuda/janus/master/janus/vim/core/before/plugin/mappings.vim
"
vmap <D-]> >gv
vmap <D-[> <gv
nmap <D-]> >>
nmap <D-[> <<
omap <D-]> >>
omap <D-[> <<
imap <D-]> <Esc>>>i
imap <D-[> <Esc><<i
" Map Command-# to switch tabs
map <D-0> 0gt
imap <D-0> <Esc>0gt
map <D-1> 1gt
imap <D-1> <Esc>1gt
map <D-2> 2gt
imap <D-2> <Esc>2gt
map <D-3> 3gt
imap <D-3> <Esc>3gt
map <D-4> 4gt
imap <D-4> <Esc>4gt
map <D-5> 5gt
imap <D-5> <Esc>5gt
map <D-6> 6gt
imap <D-6> <Esc>6gt
map <D-7> 7gt
imap <D-7> <Esc>7gt
map <D-8> 8gt
imap <D-8> <Esc>8gt
map <D-9> 9gt
imap <D-8> <Esc>9gt
" command-t
map <D-t> :CommandTFlush<CR>:CommandT<CR>
imap <D-t> <ESC>:CommandTFlush<CR>:CommandT<CR>
" unimpaired
" Bubble single lines
nmap <D-k> [e
nmap <D-j> ]e
" Bubble multiple lines
vmap <D-Up> [egv
vmap <D-Down> ]egv
vmap <D-k> [egv
vmap <D-j> ]egv
" nerd commenter
map <D-/> <plug>NERDCommenterToggle<CR>
imap <D-/> <Esc><plug>NERDCommenterToggle<CR>i
endif