-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
257 lines (224 loc) · 7.65 KB
/
.ideavimrc
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
set encoding=utf-8
scriptencoding utf-8
let mapleader=" "
source ~/.config/ideavim/sets.vim
source ~/.config/ideavim/maps.vim
nnoremap <leader>ww :w<CR>
" -- intellij only config --
set NERDTree
set ideajoin
set idearefactormode=keep
set clipboard+=ideaput
set visualbell
set surround
set ideamarks
set commentary
set argtextobj
set vim-paragraph-motion
set matchit
set exchange
set easymotion
set highlightedyank
let g:highlightedyank_highlight_duration = "500"
" status intellij
set showmode
" -- intellij mappings --
nnoremap \e :e ~/.ideavimrc<CR>
nnoremap \r :source ~/.ideavimrc<CR>
" -- resets --
map j j
map k k
map <leader>h h
map <leader>j j
map <leader>k k
map <leader>l l
" :actionlist
" running
map <leader>rr <Action>(Run)
map <leader>rc <Action>(ContextRun)
map <leader>ry <Action>(ChooseRunConfiguration)
map <leader>rd <Action>(Debug)
map <leader>rg <Action>(ContextDebug)
map <leader>rs <Action>(Stop)
map <leader>re <Action>(Resume)
map <leader>rf <Action>(RerunFailedTests)
" debugging
map = <Action>(StepOver)
map <leader>dv <Action>(StepOver)
map <leader>di <Action>(StepInto)
map <leader>dt <Action>(StepOut)
map <leader>dc <Action>(RunToCursor)
map <leader>dq <Action>(QuickEvaluateExpression)
map <leader>de <Action>(EvaluateExpression)
map <leader>dr <Action>(Resume)
" breakpoints
map <leader>bb <Action>(ToggleLineBreakpoint)
map <leader>bt <Action>(ToggleBreakpointEnabled)
map <leader>bm <Action>(XDebugger.MuteBreakpoints)
map <leader>be <Action>(EditBreakpoint)
map <leader>bw <Action>(ViewBreakpoints)
map <leader>brf <Action>(Debugger.RemoveAllBreakpointsInFile)
map <leader>brr <Action>(Debugger.RemoveAllBreakpoints)
map <leader>brR <Action>(Debugger.RestoreBreakpoint)
" file navigation
map <leader>aa <Action>(GotoAction)
map <leader>ae <Action>(SearchEverywhere)
map <leader>ap <Action>(FindInPath)
map <leader>ac <Action>(GotoClass)
map <leader>af <Action>(GotoFile)
map <leader>as <Action>(GotoSymbol)
map <leader>ar <Action>(RecentFiles)
map <leader>ao <Action>(RecentLocations)
map <leader>hh <Action>(TypeHierarchy)
map <leader>hm <Action>(MethodHierarchy)
map <leader>hc <Action>(CallHierarchy)
map <leader>o <Action>(OverrideMethods)
map <leader>st <Action>(FileStructurePopup)
map <leader>fe <Action>(SelectInProjectView)
map <Leader>en <Action>(EditSourceInNewWindow)
" tab navigation
map <s-TAB> <Action>(PreviousTab)
map <TAB> <Action>(NextTab)
" tab manipulation
map <leader><C-w>ch <Action>(CloseAllToTheLeft)
map <leader><C-w>cl <Action>(CloseAllToTheRight)
map <leader><C-w>co <Action>(CloseAllEditorsButActive)
" TabMover(10131-tabmover) plugin actions
map <leader><C-w>h <Action>(com.mnw.tabmover.actions.MoveTabUpAction)
map <leader><C-w>j <Action>(com.mnw.tabmover.actions.MoveTabToLastAction)
map <leader><C-w>k <Action>(com.mnw.tabmover.actions.MoveTabToFirstAction)
map <leader><C-w>l <Action>(com.mnw.tabmover.actions.MoveTabDownAction)
map <leader><C-w>H <Action>(com.mnw.tabmover.actions.MoveTabToPreviousWindow)
map <leader><C-w>L <Action>(com.mnw.tabmover.actions.MoveTabToNextWindow)
" text navigation
map ge <Action>(GotoNextError)
map gE <Action>(GotoPreviousError)
map gs <Action>(GotoSuperMethod)
map gi <Action>(GotoImplementation)
map gd <Action>(GotoDeclaration)
map gp <Action>(GotoSuperMethod)
map gt <Action>(GotoTest)
map gr <Action>(GotoRelated)
map <C-s> <Action>(EditorSelectWord)
map <C-s-s> <Action>(EditorUnSelectWord)
map <C-i> <Action>(Forward)
map <C-o> <Action>(Back)
map [[ <Action>(MethodUp)
map ]] <Action>(MethodDown)
map zc <Action>(CollapseRegion)
map zo <Action>(ExpandRegion)
map <leader>zc <Action>(CollapseAllRegions)
map <leader>zo <Action>(ExpandAllRegions)
" text manipulation
map <leader>R <Action>(ReformatCode)
map <leader>Mh <Action>(MoveElementLeft)
map <leader>Mj <Action>(MoveLineDown)
map <leader>Mk <Action>(MoveLineUp)
map <leader>Ml <Action>(MoveElementRight)
" refactoring
map <leader>tt <Action>(Refactorings.QuickListPopupAction)
map <leader>ts <Action>(SurroundWith)
" find
map <leader>fs <Action>(FindUsages)
map <leader>fl <Action>(FindUsagesInFile)
map <leader>fn <Action>(FindNext)
map <leader>fN <Action>(FindPrevious)
" marks
map <leader><C-b> <Action>(ShowBookmarks)
map <leader><C-m> <Action>(ToggleBookmarkWithMnemonic)
map <leader>B <Action>(Bookmarks)
map m1 <Action>(ToggleBookmark1)
map m2 <Action>(ToggleBookmark2)
map m3 <Action>(ToggleBookmark3)
map m4 <Action>(ToggleBookmark4)
map m5 <Action>(ToggleBookmark5)
map m6 <Action>(ToggleBookmark6)
map m7 <Action>(ToggleBookmark7)
map m8 <Action>(ToggleBookmark8)
map m9 <Action>(ToggleBookmark9)
map m0 <Action>(ToggleBookmark0)
map '1 <Action>(GotoBookmark1)
map '2 <Action>(GotoBookmark2)
map '3 <Action>(GotoBookmark3)
map '4 <Action>(GotoBookmark4)
map '5 <Action>(GotoBookmark5)
map '6 <Action>(GotoBookmark6)
map '7 <Action>(GotoBookmark7)
map '8 <Action>(GotoBookmark8)
map '9 <Action>(GotoBookmark9)
map '0 <Action>(GotoBookmark0)
map 'a <Action>(GotoBookmarkA)
map 'b <Action>(GotoBookmarkB)
map 'c <Action>(GotoBookmarkC)
map 'd <Action>(GotoBookmarkD)
map 'e <Action>(GotoBookmarkE)
map 'f <Action>(GotoBookmarkF)
map 'g <Action>(GotoBookmarkG)
map 'h <Action>(GotoBookmarkH)
map 'i <Action>(GotoBookmarkI)
map 'j <Action>(GotoBookmarkJ)
map 'k <Action>(GotoBookmarkK)
map 'L <Action>(GotoBookmarkL)
map 'm <Action>(GotoBookmarkM)
map 'n <Action>(GotoBookmarkN)
map 'o <Action>(GotoBookmarkO)
map 'p <Action>(GotoBookmarkP)
map 'q <Action>(GotoBookmarkQ)
map 'r <Action>(GotoBookmarkR)
map 's <Action>(GotoBookmarkS)
map 't <Action>(GotoBookmarkT)
map 'u <Action>(GotoBookmarkU)
map 'v <Action>(GotoBookmarkV)
map 'w <Action>(GotoBookmarkW)
map 'x <Action>(GotoBookmarkX)
map 'y <Action>(GotoBookmarkY)
map 'z <Action>(GotoBookmarkZ)
" yanking
map <leader>yr <Action>(CopyReference)
map <leader>yP <Action>(CopyPaths)
map <leader>yp <Action>(CopyPathFromRepositoryRootProvider)
map <leader>yf <Action>(CopyFileName)
" windows
map <leader>wr <Action>(ActivateRunToolWindow)
map <leader>wd <Action>(ActivateDebugToolWindow)
map <leader>wb <Action>(ActivateBuildToolWindow)
map <leader>we <Action>(ActivateEventLogToolWindow)
map <leader>wm <Action>(ActivateProblemsViewToolWindow)
map <leader>ws <Action>(ActivateServicesToolWindow)
map <leader>wt <Action>(ActivateTerminalToolWindow)
map <leader>wf <Action>(ActivateFindToolWindow)
map <leader>wo <Action>(Terminal.OpenInTerminal)
map <leader>wp <Action>(JumpToLastWindow)
map <leader>wn <Action>(ActivateEndpointsToolWindow)
map <leader>wg <Action>(ActivateGradleToolWindow)
map <leader>wv <Action>(ActivateMavenToolWindow)
map <leader>wG <Action>(Vcs.ShowTabbedFileHistory)
" window layout
map <leader>xf <Action>(ToggleDistractionFreeMode)
map <leader>xx <Action>(HideAllWindows)
map <C-n> <Action>(HideAllWindows)
map <leader>xc <Action>(HideAllWindows)<bar> <Action>(SelectInProjectView)<bar> <Action>(FocusEditor)
" windows navigation
map <Leader>n <Action>(NextWindow)
map <Leader>N <Action>(PreviousWindow)
" utils
map <leader>K <Action>(QuickJavaDoc)
map <leader>E <Action>(ShowErrorDescription)
map <leader><C-q> <Action>(CloseProject)
map <leader><C-s-q> <Action>(CloseOtherProjects)
" others
map <leader>MM <Action>(meme.machine)
map <leader>MD <Action>(zd.zero.waifu.motivator.plugin.actions.ShowWaifuOfTheDayAction)
" harpooner
map <leader>m <Action>(HarpoonerQuickMenu)
map <leader>ha <Action>(HarpoonerAddFile)
map <leader>1 <Action>(HarpoonerOpenFile0)
map <leader>2 <Action>(HarpoonerOpenFile1)
map <leader>3 <Action>(HarpoonerOpenFile2)
map <leader>4 <Action>(HarpoonerOpenFile3)
map <leader>5 <Action>(HarpoonerOpenFile4)
map <leader>6 <Action>(HarpoonerOpenFile5)
map <leader>7 <Action>(HarpoonerOpenFile6)
map <leader>8 <Action>(HarpoonerOpenFile7)
map <leader>9 <Action>(HarpoonerOpenFile8)
map <leader>0 <Action>(HarpoonerOpenFile9)