-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.ideavimrc
132 lines (107 loc) · 3.64 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
let mapleader = " "
" Vim settings
set ignorecase
set smartcase
set incsearch
set hlsearch
" Extensions
set highlightedyank
let g:highlightedyank_highlight_duration = "5000"
let g:highlightedyank_highlight_color = "rgba(150, 255, 200, 255)"
set surround
set commentary
set argtextobj " cia → change inside arguments
set quickscope " fFtT helper
set sneak " sS → a fFtT with 2 chars
" set which-key
"--------- NAV ---------"
" split window
no <space>w <C-w>
no <Leader>wM <C-W>_\|<C-W><BAR>
nnoremap <space>wH :action MoveTabLeft<CR>
nnoremap <space>wJ :action MoveTabDown<CR>
nnoremap <space>wK :action MoveTabUp<CR>
nnoremap <space>wL :action MoveTabRight<CR>
" TODO
nnoremap <space>w1 :action MoveEditorToOppositeTabGroup<CR>
nnoremap <space>w2 :action MaximizeEditorInSplit<CR>
nnoremap <C-3> :action Back<CR>
nnoremap <C-8> :action Forward<CR>
"" Choosing handlers in conflicting Intellij/IdeaVim keymaps =======
sethandler <C-w> n-v-i:vim
sethandler <C-r> n-v-i:vim
sethandler <C-t> n-v-i:vim
sethandler <C-i> n-v-i:vim
sethandler <C-o> n-v-i:vim
sethandler <C-]> n-v-i:vim
sethandler <C-[> n-v-i:vim
sethandler <C-u> n-v-i:vim
sethandler <C-d> n-v-i:vim
sethandler <C-e> n-v-i:vim
sethandler <C-y> n-v-i:vim
sethandler <C-v> n-v-i:vim
" misc
no mw :write<CR>
no mq :quit<CR>
no mQ :quitall<CR>
no md :bn\|bd#<CR>
no gmd :bn!\|bd! #<CR>
nn sb :ls<CR>:b<Space>
nn sp :e #<CR>
nn st :tag /
nn glhl :set hls!<CR>
nn glcc :set cursorcolumn!<CR>
nn glcl :set cursorline!<CR>
nn glso :source ~/.ideavimrc<cr>
nnoremap <Leader>f :action ShowNavBar<CR>
" refactor
nnoremap <leader>gen :action Generate<CR>
nnoremap <leader>rcs :action ChangeSignature<CR>
nnoremap <leader>ref :action Refactorings.QuickListPopupAction<CR>
nnoremap <leader>rfo :action ReformatCode<CR>
nnoremap <leader>ric :action IntroduceConstant<CR>
nnoremap <leader>ril :action Inline<CR>
nnoremap <leader>rip :action ReplaceInPath<CR>
nnoremap <leader>riv :action IntroduceVariable<CR>
nnoremap <leader>rre :action RenameElement<CR>
nnoremap <leader>rrf :action RenameFile<CR>
nnoremap <leader>rsw :action SurroundWith<CR>
nnoremap <leader>rxi :action ExtractInterface<CR>
nnoremap <leader>rxm :action ExtractMethod<CR>
" info
nnoremap <leader>ich :action CallHierarchy<CR>
nnoremap <leader>ico :action EditorContextInfo<CR>
nnoremap <leader>ido :action QuickJavaDoc<CR>
nnoremap <leader>ifs :action FileStructurePopup<CR>
nnoremap <leader>iim :action QuickImplementations<CR>
nnoremap <leader>ipa :action ParameterInfo<CR>
nnoremap <leader>isu :action ShowUsages<CR>
nnoremap <leader>ith :action TypeHierarchy<CR>
nnoremap <leader>ity :action QuickTypeDefinition<CR>
" find
nnoremap <leader>fin :action Find<CR>
nnoremap <leader>fip :action FindInPath<CR>
nnoremap <leader>fus :action FindUsages<CR>
" goto
nnoremap <leader>gac :action GotoAction<CR>
nnoremap <leader>gcl :action GotoClass<CR>
nnoremap <leader>gde :action GotoDeclaration<CR>
nnoremap <leader>gfi :action GotoFile<CR>
nnoremap <leader>gim :action GotoImplementation<CR>
nnoremap <leader>gsu :action GotoSuperMethod<CR>
nnoremap <leader>gsy :action GotoSymbol<CR>
" nav
nnoremap ]b :action GotoNextBookmark<CR>
nnoremap [b :action GotoPreviousBookmark<CR>
nnoremap ]c :action VcsShowNextChangeMarker<CR>
nnoremap [c :action VcsShowPrevChangeMarker<CR>
nnoremap ]e :action GotoNextError<CR>
nnoremap [e :action GotoPreviousError<CR>
nnoremap <leader>grf :action RecentFiles<CR>
nnoremap <leader>grl :action RecentLocations<CR>
" debug
nnoremap <leader>db :action ToggleLineBreakpoint<CR>
nnoremap <leader>dr :action RunToCursor<CR>
nnoremap <leader>ds :action StepOver<CR>
nnoremap <leader>dx :action EvaluateExpression<CR>
nnoremap <leader>dq :action Stop<CR>