-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxvimrc
160 lines (143 loc) · 5.1 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" XVim config.
" Author: 邓锦龙(BronteDeng)
" Note: This file contains base keymap and xvim cmd keymap.
" Unfrequently used keymap is indent right.
" If lost document focus, use menu Navigate -> movie to focus to editor (cmd + j)
" Data: Sat Mar 15 10:05:14 CST 2014
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" not supported
"let mapleader = ","
"""""""""""""""""""""""""""""""""""""""""
" assistant editor and jump between Frame
"""""""""""""""""""""""""""""""""""""""""
" show assistant editor (then add is enable)
" show standard editor to close assistant editor
map ,sa :xccmd changeToGeniusEditor<CR>
" add new assistant editor
"map ,aa :xccmd addAssistantEditor<CR>
" del one assistant editor
"map ,da :xccmd removeAssistantEditor<CR>
" move between windows
map <C-j> <C-w>j<CR>
map <C-k> <C-w>k<CR>
map <C-h> <C-w>h<CR>
map <C-l> <C-w>l<CR>
inoremap jk <ESC>
inoremap <S-Enter> <ESC>A;<Enter>
""""""""""""""""""""""""""""""""""""""""""""""""""""
" tab
" note: if tabprevious and tabnext lost editor focus,
" try :xccmd.
""""""""""""""""""""""""""""""""""""""""""""""""""""
" tab new
map ,tn :xccmd newTab<CR>
" tab close
"map ,tc :xccmd closeCurrentTab<CR>
map ,tc :tabclose<CR>
" tab pre
"map ,ti :xccmd selectPreviousTab<CR>
map ,ti :tabprevious<CR>
" tab next
"map ,to :xccmd selectNextTab<CR>
map ,to :tabnext<CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""
" View
" Note: standard editor shortkey is convenient
"""""""""""""""""""""""""""""""""""""""""""""""""""
" Code Snippet Library
map ,cs :xcmenucmd Show Code Snippet Library<CR>
" File Template Library
map ,ft :xcmenucmd Show File Template Library<CR>
" Media Library
map ,ml :xcmenucmd Show Media Library<CR>
" (Quick) help Inspector
map ,hi :xcmenucmd Show Quick Help Inspector<CR>
" File inspector
map ,fi :xcmenucmd Show File Inspector<CR>
" toggle navigator, debug area, utilities, ToolBar
" l-left, b-bottom, r-right, t-top or toolbar
map ,tl :xccmd toggleNavigatorsVisibility<CR>
map ,tb :xccmd toggleDebuggerVisibility<CR>
map ,tr :xccmd toggleUtilitiesVisibility<CR>
map ,tt :xccmd toggleToolbarShown<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""
" Navigate
""""""""""""""""""""""""""""""""""""""""""""""""""
" dc-debug console
map ,dc :xcmenucmd Activate Console<CR>
"map , :xcmenucmd Reveal in Project Navigator<CR>
"map , :xcmenucmd Reveal in Symbol Navigator<CR>
"map , :xcmenucmd Reveal in Debug Navigator<CR>
" open current file in selected editor
"map ,oi :xcmenucmd Open in…<CR>
" ctrl+i/o maybe better
map ,f :xccmd goForwardInHistoryByCommand<CR>
map ,b :xccmd goBackInHistoryByCommand<CR>
"map ,jd :xcmenucmd Jump to Definition<CR> " vim cmd:gd
map ,jn :xcmenucmd Jump to Next Issue<CR>
"map ,ni :xcmenucmd Fix Next Issue<CR>
map ,jp :xcmenucmd Jump to Previous Issue<CR>
"map ,pi :xcmenucmd Fix Previous Issue<CR>
" switch between .h/.m
" You can use vim cmd |gd| and |ctrl+i/o| to navigate between files.
map ,n :xccmd jumpToNextCounterpart<CR>
" place holder is Like <#...#>, jump to front of placeholder then use Key Tab.
"map ,np :xccmd selectNextPlaceholder<CR>
"map ,pp :xccmd selectPreviousPlaceholder<CR>
" reveal file or symbol
map ,pr :xccmd revealInProjectNavigator<CR>
map ,sr :xccmd revealInSymbolNavigator<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""
" Editor
""""""""""""""""""""""""""""""""""""""""""""""""""
" Show Completions
"map ,c :xccmd complete<CR>
" Edit all in scope
"map ,ea :xccmd toggleTokenizedEditing<CR>
" Fold
nmap ,zf :xccmd fold<CR>
" <S-SPACE> not work
nmap ,zu :xccmd unfold<CR>
map ,fa :xccmd foldAllMethods<CR>
map ,ua :xccmd unfoldAllMethods<CR>
map ,fc :xccmd foldAllComments<CR>
map ,uc :xccmd unfoldAllComments<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""
" Project
""""""""""""""""""""""""""""""""""""""""""""""""""
map ,r :run<CR>
map ,bp :xcmenucmd Build<CR>
map ,cp :xcmenucmd Clean<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""
" Miscellaneous (杂项)
""""""""""""""""""""""""""""""""""""""""""""""""""
"quick save and quit
map ,w :w<CR>
set ignorecase
" search the string cursor points to. Very Usefull.
map ,s viw:xccmd findSelectedTextInWorkspace<CR>
"map ,sc :xccmd commitCommand<CR>
" open Documentation and API Reference
"map ,doc :xccmd showDeveloperDocumentation<CR>
" show quick help for current word
map ,h :xhelp<CR>
" search document for text cursor points to.
map ,sh :xccmd searchDocumentationForSelectedText<CR>
" Filter file (view menus achieve the goal too)
map ,fn :menucmd Title:Filter in Navigator<CR>
map ,fl :menucmd Title:Filter in Library<CR>
" Open Quickly
" Note: slower then short key |cmd+shift+o|
map ,o :xccmd openQuickly<CR>
" Close Window
map ,cw :xccmd performClose<CR>
" close current file
map ,q :xccmd closeDocument<CR>
" show in Finder
map ,in :xccmd showInFinder<CR>
" create snapshot and restore
map ,ss :xccmd createSnapshot<CR>
map ,rs :xccmd restoreSnapshot<CR>
" cmd+L, go to line
map ,l :xccmd openQuicklyScoped<CR>