-
Notifications
You must be signed in to change notification settings - Fork 0
/
ideavimrc
72 lines (60 loc) · 2.02 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
source ~/.vimrc
" Add back arrow keys since python console seems to use the settings for ideavim but doesn't fucking let you get out of normal mode.
" The result is that this jackass disables the arrow keys in the python console but doesn't let you navigate with hjkl either...
noremap <Up> <Up>
noremap <Down> <Down>
noremap <Left> <Left>
noremap <Right> <Right>
inoremap <Up> <Up>
inoremap <Down> <Down>
inoremap <Left> <Left>
inoremap <Right> <Right>
" ideavim specific
set ideajoin
set clipboard=ideaput
" window navigation? doesn't seem to work, remove soon
nnoremap <c-l> <c-w>l
nnoremap <c-j> <c-w>j
nnoremap <c-h> <c-w>h
nnoremap <c-k> <c-w>k
nnoremap <a-h> gT
nnoremap <a-l> gt
nnoremap <c-s-tab> gT
nnoremap <c-tab> gt
" actions
nnoremap <space>q :action CloseContent<cr>
nnoremap <space>Q :action ReopenClosedTab<cr>
nnoremap <space>\ :action VimFilePrevious<cr>
nnoremap <space>e :action SearchEverywhere<cr>
nnoremap <space>E :action Switcher<cr>
nnoremap <space>t :action FileStructurePopup<cr>
nnoremap <space>T :action GotoSymbol<cr>
nnoremap <space>a :action GotoAction<cr>
nnoremap <space>b :action ToggleLineBreakpoint<cr>
" code navigation
nnoremap <space>] :action GotoImplementation<cr>
nnoremap <space>[ :action GotoSuperMethod<cr>
nnoremap <space>u :action FindUsages<cr>
nnoremap <space>gt :action GotoTest<cr>
nnoremap <space>k :action HighlightUsagesInFile<cr>
nnoremap \r :action RunClass<cr>
nnoremap \R :action Run<cr>
nnoremap \d :action DebugClass<cr>
nnoremap \D :action Debug<cr>
nnoremap \c :action CheckStyleCurrentFileAction<cr>
nnoremap gd :action GotoDeclaration<cr>
" code refactoring
nnoremap <space>rr :action RenameElement<cr>
" enable sneak (keys: s/S/;/,)
set sneak
" Enable NERDTree plugin
set NERDTree
nnoremap <space>t :NERDTreeFocus<cr>
nnoremap <space>T :NERDTreeToggle<cr>
" Common Commands while tree is focused
" q Close the NERDTree window
" p Jump to current nodes parent
" t Open selected node/bookmark in a new tab
" o Open directory/file/node
" Enable commentary plugin
set commentary