-
Notifications
You must be signed in to change notification settings - Fork 0
/
ideavimrc
163 lines (133 loc) · 5.26 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
set ideajoin
let mapleader = " "
set surround
set commentary
set multiple-cursors
set history=1000
set visualbell
" set noerrorbells
set incsearch " Highlight search results when typing
set hlsearch " Highlight search results
set relativenumber " relative numbers
" for yanking to clipboard
set clipboard+=unnamed
set scrolloff=3 " Display at least 3 lines around you cursor
set ignorecase " Ignore case when searching
set smartcase " If there is an uppercase in your search term
set which-key
set wrap
Plug 'machakann/vim-highlightedyank'
Plug 'easymotion/vim-easymotion'
" nnoremap <leader>s :action KJumpAction<cr>
nmap s :action KJumpAction.Word1<cr>
" Clear last search highlight
nnoremap <esc> :noh<cr>
" KEYMAP
inoremap jk <esc>
nnoremap - :action ActivateProjectToolWindow<CR>
" nnoremap - :action ProjectViewChangeView<CR>
nnoremap <c-w>o :action HideAllWindows<cr>
nnoremap <leader>bw :action SaveDocument<CR>
nnoremap <leader>b :action Switcher<CR>
nnoremap <c-6> :action Switcher<CR>
nnoremap gd :action GotoDeclaration<CR>
nnoremap gr :action ShowUsages<CR>
nnoremap gi :action GotoImplementation<CR>
nnoremap <leader>rl :action Refactorings.QuickListPopupAction<CR>
vmap <leader>rl :action Refactorings.QuickListPopupAction<CR>
nnoremap <leader>ra :action ShowIntentionActions<CR>
vmap <leader>ra :action ShowIntentionActions<CR>
nnoremap <leader>ye :action CopyElement<CR>
" nnoremap <leader>rf :action ReformatCode<CR>
nnoremap <leader>rF :action com.intellij.csharpier.ReformatWithCSharpierAction<CR>
nnoremap <leader>rio :action OptimizeImports<CR>
nnoremap <leader>rr :action RenameElement<CR>
nnoremap <leader>cf :action NewFile<CR>
nnoremap <leader>cd :action NewDirectory<CR>
nnoremap <leader>rf :action RenameFile<CR>
" Open terminal
nnoremap <Leader>t :action ActivateTerminalToolWindow<CR>
" Comment
" nnoremap <leader>cc :action CommentByLineComment<CR>
" vmap <leader>cc :action CommentByLineComment<CR>
" vmap <leader>cb :action CommentByBlockComment<CR>
" Menus
" nnoremap <leader>m :action ActivateProjectToolWindow<CR>
" Refactorings
nnoremap <leader>riv :action Inline<CR>
nnoremap <leader>rev :action IntroduceVariable<CR>
vmap <leader>rev :action IntroduceVariable<CR>
nnoremap <leader>ref :action IntroduceField<CR>
vmap <leader>ref :action IntroduceField<CR>
nnoremap <leader>rep :action IntroduceParameter<CR>
vmap <leader>rep :action IntroduceParameter<CR>
nnoremap <leader>rem :action ExtractMethod<CR>
vmap <leader>rem :action ExtractMethod<CR>
" nnoremap <leader>rm :action ExtractMethod<CR>
" vmap <leader>rp :action IntroduceParameter<CR>
" vmap <leader>ri :action Inline<CR>
" vmap <leader>rv :action IntroduceVariable<CR>
" vmap <leader>rm :action ExtractMethod<CR>
" nnoremap <leader>rp :action IntroduceParameter<CR>
" nnoremap <leader>im :action ImplementMethods<CR>
" nnoremap <leader>om :action OverrideMethods<CR>
" nnoremap <leader>qf :action ShowIntentionActions<CR>
" GoTo
nnoremap <leader>gs :action ActivateStructureToolWindow<CR>
nnoremap <leader>sp :action ParameterInfo<CR>
nnoremap <leader>sd :action QuickImplementations<CR>
" Search
" nnoremap <leader>ps :action GotoSymbol<CR>
" nnoremap <leader>ps :action SearchEverywhere<CR>
nnoremap <leader>sg :action SearchEverywhere<CR>
nnoremap <leader>sf :action GotoFile<CR>
nnoremap <leader>ss :action GotoSymbol<CR>
nnoremap <leader>sp :action RecentProjectListGroup<CR>
nnoremap <leader>sb :action ShowNavBar<CR>
nnoremap <leader>sg :action FileStructurePopup<CR>
" nnoremap <leader>ra :action GotoAction<CR>
nnoremap <leader>/ :action FindInPath<CR>
" nnoremap <leader>fr :action ReplaceInPath<CR>
" vmap <leader>fg :action FindInPath<CR>
" vmap <leader>fr :action ReplaceInPath<CR>
" Test and Run
nnoremap <leader>rc :action Run<CR>
nnoremap <leader>gt :action GotoTest<CR>
" nnoremap <leader>tn :action RunClass<CR>
" nnoremap <leader>tl :action Rerun<CR>
" nnoremap <leader>tf :action RerunFailedTests<CR>
" Tests
nnoremap <leader>rt :action RunContextAction<CR>
nnoremap <leader>;d :action GolandUnitTestDebugContextAction<CR>
nnoremap <leader>;t :action GolandUnitTestRepeatPreviousRunAction<CR>
nnoremap <leader>;l :action GolandTestRunSolutionAction<CR>
nnoremap <leader>;s :action GolandTestSessionAbortAction<CR>
" Undo
nnoremap <leader>u :action LocalHistory.ShowHistory<CR>
" Jumping
" built-in navigation to navigated items works better
nnoremap <c-o> :action Back<cr>
nnoremap <c-i> :action Forward<cr>
" Navigation
nnoremap ]e :action ReSharperGotoNextErrorInSolution<cr>
nnoremap [e :action ReSharperGotoPrevErrorInSolution<cr>
nnoremap ]d :action GotoNextError<cr>
nnoremap [d :action GotoPreviousError<cr>
nnoremap ]h :action VcsShowNextChangeMarker<cr>
nnoremap [h :action VcsShowPrevChangeMarker<cr>
nnoremap <leader>es :action ShowErrorDescription<cr>
nnoremap [q :action PreviousOccurence<cr>
nnoremap ]q :action NextOccurence<cr>
nnoremap [m :action MethodUp<cr>
nnoremap ]m :action MethodDown<cr>
" Compile
nnoremap <leader>cp :action BuildOnlyCurrentProject<CR>
nnoremap <leader>cr :action RebuildSolutionAction<CR>
nnoremap <leader>cs :action BuildWholeSolutionAction<CR>
" Misc
nnoremap <leader><cr> :source ~/.ideavimrc<CR>
nnoremap <c-x> :action ShowErrorDescription<CR>
" Cody
nnoremap <leader>aa :action cody.openChat<CR>
vmap <leader>ae :action cody.command.Explain<CR>
vmap <leader>as :action cody.command.Smell<CR>