-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxvimrc
114 lines (84 loc) · 2.96 KB
/
xvimrc
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
set ignorecase
set wrapscan
set laststatus=2
set guioptions=
" xcode new editor features
nnoremap <C-y><C-y> :xcmenucmd Select Structure<Cr>
inoremap <C-y><C-y> <Esc>:xcmenucmd Select Structure<Cr>
" fix cursor not shown in playground for XCode 7.1
set blinkcursor
noremap <D-[> <Esc>
inoremap <D-[> <Esc>
" `ciw` not comfortable to press
nnoremap gs ciw
" go to next/previous func declaration header line
nnoremap ]] /^[-+]|\bfunc\b<Cr>
nnoremap [[ ?^[-+]|\bfunc\b<Cr>
" jump between panes
nnoremap gl <C-w>l
nnoremap gh <C-w>h
" move in bigger stride
noremap J 5j
noremap K 5k
noremap H <C-b>
noremap L <C-f>
nnoremap g; g;zz
" sensible Y
nnoremap Y y$
nnoremap ]q :ni<Cr>
nnoremap [q :pi<Cr>
nnoremap ]c :nc<Cr>
nnoremap [c :pc<Cr>
nnoremap ]j :nj<Cr>
nnoremap [j :pj<Cr>
" Move lines
nnoremap ]e ddp
nnoremap [e ddkP
" Padding lines
nnoremap [<Space> O<Esc>j
nnoremap ]<Space> o<Esc>k
" Clear all
nnoremap cae <Esc><Esc>ggcG
nnoremap <Backspace>w :xcmenucmd Save<Cr>
nnoremap <Backspace>a :xcmenucmd Save All<Cr>
nnoremap <C-w><C-w> :xcmenucmd Move Focus to Next Area<Cr>
" View Menu {{{1
nnoremap <Space>e :xcmenucmd Show Standard Editor<Cr>
nnoremap <Space>a :xcmenucmd Show Assistant Editor<Cr>
nnoremap <Space>p :xcmenucmd Show Project Navigator<Cr>
nnoremap <Space>s :xcmenucmd Show Symbol Navigator<Cr>
nnoremap <Space>f :xcmenucmd Show Find Navigator<Cr>
nnoremap <Space>i :xcmenucmd Show Issue Navigator<Cr>
nnoremap <Space>t :xcmenucmd Show Test Navigator<Cr>
nnoremap <Space>d :xcmenucmd Show Debug Navigator<Cr>
nnoremap <Space>b :xcmenucmd Show Breakpoint Navigator<Cr>
nnoremap <Space>r :xcmenucmd Show Report Navigator<Cr>
nnoremap <C-h> :xccmd toggleNavigatorsVisibility<Cr>
nnoremap <C-j> :xccmd toggleDebuggerVisibility<Cr>
nnoremap <C-l> :xccmd toggleUtilitiesVisibility<Cr>
nnoremap <C-u> :xccmd toggleUtilitiesVisibilityAlternate<Cr>
nnoremap zi :xccmd toggleIssueShown<Cr>
nnoremap zm :xccmd toggleMessageBubbles<Cr>
nnoremap zb :xccmd toggleBreakpointAtCurrentLine<Cr>
# }}}
" Build, Run, Test, Profile ... {{{1
" Build and ...
nnoremap ,,b :xcmenucmd Build<Cr>
nnoremap ,,r :xcmenucmd Run<Cr>
nnoremap ,,t :xcmenucmd Test<Cr>
nnoremap ,,p :xcmenucmd Profile<Cr>
nnoremap ,,a :xcmenucmd Analyze<Cr>
nnoremap gt :xcmenucmd Test Again<Cr>
" Without building
nnoremap <Space><Space>r :xcmenucmd Run Without Building<Cr>
nnoremap <Space><Space>t :xcmenucmd Test Without Building<Cr>
nnoremap <Space><Space>p :xcmenucmd Profile Without Building<Cr>
" Playground
nnoremap ,,x :xcmenucmd Run Playground<Cr>
" Build for ...
nnoremap ,br :xcmenucmd Running<Cr>
nnoremap ,bt :xcmenucmd Testing<Cr>
nnoremap ,bp :xcmenucmd Profiling<Cr>
" }}}
" quit
nnoremap <C-q> :xcmenucmd Quit<Cr>