-
Notifications
You must be signed in to change notification settings - Fork 2
/
vrapperrc
178 lines (156 loc) · 6.19 KB
/
vrapperrc
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
"" Settings ========================================================
set scrolloff=10
set showmode
set showcmd
set smartcase
set incsearch
set hlsearch
set visualbell
set clipboard+=unnamed
let mapleader = ","
"" Key mappings ====================================================
" NORMAL MODE"
" Edit (leader p, Bs, x, /, a, o, O, x)
"Replace word with paste
nnoremap <a-p> "_diwP
nnoremap <a-j> :m .+1<cr>==
nnoremap <a-k> :m .-2<cr>==
nnoremap <a-d> "_diw
nnoremap <a-c> "_ciw
nnoremap <a-z> "_ci"
nnoremap <a-x> "_ci(
"Change function argument
nmap <a-a> cia
nmap <a-s> daa
nnoremap <a-o> o<ESC>
nnoremap <a-O> O<ESC>
" Motions
nnoremap E ge
nnoremap m ]m
nnoremap M [m
nnoremap H ^
nnoremap L $
nnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz
nnoremap <C-o> :eclipseaction Back<cr>
nnoremap <C-i> :eclipseaction Forward<cr>
nnoremap n nzz
nnoremap N Nzz
" Windows and buffers (leader w)
nnoremap <leader>wh <C-w>h
nnoremap <leader>wl <C-w>l
nnoremap <leader>wk <C-w>k
nnoremap <leader>wj <C-w>j
nnoremap <leader>ww :eclipseaction CloseAllEditorsButActive<cr>
nnoremap <leader>ww :eclipseaction CloseAllEditorsButActive<cr>
nnoremap <leader>wq :eclipseaction CloseContent<cr>
nnoremap <leader>wv :eclipseaction SplitVertically<cr>
nnoremap <leader>ws :eclipseaction SplitHorizontally<cr>
nnoremap <leader>wu :eclipseaction Unsplit<cr>
nnoremap <leader>wm :eclipseaction MoveEditorToOppositeTabGroup<cr>
nnoremap W :wall<CR>
" Folds
nnoremap | :eclipseaction CollapseAllRegions<CR>
nnoremap -- :eclipseaction ExpandAllRegions<CR>
" Macros and registers
" Execute macro saved in 'q' register
nnoremap qj @q
nnoremap "_ t
" Finder (leader f)
nnoremap ;; :nohlsearch<CR>
map <leader>ff :eclipseaction GotoClass<cr>
map <leader>fn :eclipseaction GotoFile<cr>
map <leader>fg :eclipseaction FindInPath<cr>
map <leader>fh :eclipseaction RecentFiles<cr>
map <leader>fm :eclipseaction RecentLocations<cr>
map <leader>fs :eclipseaction GotoSymbol<cr>
map <leader>fz :eclipseaction Find<cr>
map <leader>fr :eclipseaction Replace<cr>
map <leader>fx :eclipseaction PasteMultiple<cr>
map <leader>ft :eclipseaction ActivateTODOToolWindow<cr>
" Debug (leader d)
nnoremap <leader>dr :eclipseaction Run<cr>
nnoremap <leader>dR :eclipseaction ChooseRunConfiguration<cr>
nnoremap <leader>de :eclipseaction Debug<cr>
nnoremap <leader>dE :eclipseaction ChooseDebugConfiguration<cr>
nnoremap <leader>dk :eclipseaction Stop<cr>
nnoremap <leader>db :eclipseaction ToggleLineBreakpoint<cr>
nnoremap <leader>da :eclipseaction XDebugger.MuteBreakpoints<cr>
nnoremap <leader>dv :eclipseaction StepOver<cr>
nnoremap <leader>di :eclipseaction StepInto<cr>
nnoremap <leader>do :eclipseaction StepOut<cr>
nnoremap <leader>dc :eclipseaction Resume<cr>
map <leader>dx :eclipseaction QuickEvaluateExpression<cr>
map <leader>dw :eclipseaction Debugger.AddToWatch<cr>
" Code navigation (leader c)
eclipseaction findDeclarations org.eclipse.jdt.ui.edit.text.java.search.declarations.in.workspace
nnoremap <leader>cd :findDeclarations<cr>
eclipseaction goToType org.eclipse.jdt.ui.actions.GoToType
nnoremap <leader>ct :goToType<cr>
eclipseaction goToImplementation org.eclipse.jdt.ui.edit.text.java.open.implementation
nnoremap <leader>ci :goToImplementation<cr>
eclipseaction goToSuperImplementation org.eclipse.jdt.ui.edit.text.java.open.super.implementation
nnoremap <leader>cs :goToSuperImplementation<cr>
eclipseaction showReferences org.eclipse.jdt.ui.edit.text.java.search.references.in.workspace
nnoremap <leader>cr :showReferences<cr>
eclipseaction showJavaDoc org.eclipse.jdt.ui.edit.text.java.show.javadoc
nnoremap <leader>cv :showJavaDoc<cr>
" Refactoring (leader r)
eclipseaction contentAssist org.eclipse.jdt.ui.edit.text.java.complete.prefix
nnoremap <leader>re :contentAssist<cr>
eclipseaction rename org.eclipse.jdt.ui.edit.text.java.rename.element
nnoremap <leader>rn :rename<cr>
eclipseaction extractParameter org.eclipse.jdt.ui.edit.text.java.introduce.parameter
nnoremap <leader>rv :extractParameter<cr>
eclipseaction extractConstant org.eclipse.jdt.ui.edit.text.java.extract.constant
nnoremap <leader>rc :extractConstant<cr>
eclipseaction introduceParameter org.eclipse.jdt.ui.edit.text.java.introduce.parameter
nnoremap <leader>rf :introduceParameter<cr>
nnoremap <leader>rx :eclipseaction org.eclipse.jdt.ui.actions.ExtractMethod<cr>
eclipseaction format org.eclipse.jdt.ui.edit.text.java.format
nnoremap <leader>rf :format<cr>
eclipseaction organizeImports org.eclipse.jdt.ui.edit.text.java.organize.imports
nnoremap <leader>ro :organizeImports<cr>
eclipseaction inline org.eclipse.jdt.ui.edit.text.java.inline
nnoremap <leader>ri :inline<cr>
eclipseaction convertAnonymousToNested org.eclipse.jdt.ui.edit.text.java.convert.anonymous.to.nested
nnoremap <leader>ra :convertAnonymousToNested<cr>
" Source generation (leader s)
eclipseaction generateConstructor org.eclipse.jdt.ui.edit.text.java.generate.constructor.using.fields
nnoremap <leader>sc :generateConstructor<cr>
eclipseaction generateGetterSetter org.eclipse.jdt.ui.edit.text.java.create.getter.setter
nnoremap <leader>sg :generateGetterSetter<cr>
eclipseaction generateHashcodeEquals org.eclipse.jdt.ui.edit.text.java.generate.hashcode.equals
nnoremap <leader>se :generateHashcodeEquals<cr>
nnoremap <leader>sn :eclipseaction NewClass<cr>
nnoremap <leader>sf :eclipseaction NewScratchFile<cr>
" Errors and diagnostics (leader e)
eclipseaction goToNextProblem org.eclipse.jdt.ui.edit.text.java.show.next.problem
map <leader>en :goToNextProblem<cr>
eclipseaction goToPreviousProblem org.eclipse.jdt.ui.edit.text.java.show.previous.problem
map <leader>ep :goToPreviousProblem<cr>
" Git (leader g)
" Display Modes (leader m)
map <leader>md :eclipseaction ToggleDistractionFreeMode<cr>
map <leader>mz :eclipseaction ToggleZenMode<cr>
map <leader>mf :eclipseaction ToggleFullScreen<cr>
" INSERT MODE
inoremap jk <Esc>
inoremap <a-s> <Del>
inoremap <a-d> <C-o>"_diw
inoremap <a-c> <C-o>"_ciw
inoremap <a-e> <C-o>"_de
inoremap <a-w> <C-o>w
inoremap <a-b> <C-o>b
inoremap <a-j> <ESC>:m .+1<cr>==gi
inoremap <a-k> <ESC>:m .-2<cr>==gi
" VISUAL MODE
vnoremap jk <Esc>
" Easy visual indentation
vnoremap < <gv
vnoremap > >gv
nnoremap + v
vnoremap + :eclipseaction EditorSelectWord<cr>
vnoremap _ :eclipseaction EditorUnSelectWord<cr>
nnoremap <c-s> ggVG
vnoremap <c-s> ggOG