-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
103 lines (85 loc) · 2.95 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
let mapleader=","
set hlsearch
set scrolloff=3
set ignorecase smartcase
set showmode
set history=1000
#set multiple-cursors
" easy system clipboard copy/paste
noremap <leader>y "*y
noremap <leader>Y "*Y
noremap <leader>p "*p
noremap <leader>P "*P
" easy tab navigation
noremap <a-h> :action PreviousTab<cr>
noremap <a-l> :action NextTab<cr>
" easy window navigation
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 <c-s-tab> gT
nnoremap <c-tab> gt
" actions
nnoremap <leader>q :action CloseContent<cr>
nnoremap <leader>Q :action ReopenClosedTab<cr>
nnoremap <leader>\ :action VimFilePrevious<cr>
nnoremap <leader>e :action SearchEverywhere<cr>
nnoremap <leader>E :action Switcher<cr>
nnoremap <leader>t :action FileStructurePopup<cr>
nnoremap <leader>T :action GotoSymbol<cr>
nnoremap <leader>a :action GotoAction<cr>
nnoremap <leader>i :action GotoImplementation<cr>
nnoremap <leader>d :action GotoDeclaration<cr>
nnoremap <leader>b :action GotoDeclaration<cr>
nnoremap <leader>s :action SaveAll<cr>
nnoremap <leader>j :action Back<cr>
nnoremap <leader>k :action Forward<cr>
nnoremap <leader>w :action MoveEditorToOppositeTabGroup<cr>
nnoremap <leader>o :action OptimizeImports<cr>
nnoremap <leader>c :so ~/.ideavimrc<cr>:echo "ideavimrc reloaded"<cr>
" zoom lever
nnoremap <c--> :action EditorDecreaseFontSize<cr>
nnoremap <c-=> :action EditorIncreaseFontSize<cr>
" built in search looks better
nnoremap <leader>f :action Find<cr>
nnoremap <leader>r :action Replace<cr>
nnoremap <a-s> :action SplitVertically<cr>:action CloseContent<cr>
nnoremap <a-v> :action SplitHorizontally<cr>:action CloseContent<cr>
nnoremap <a-i> :source ~/.ideavimrc<CR>:echo ".ideavimrc reloaded!"<CR><CR
" code navigation
nnoremap <leader>] :action GotoImplementation<cr>
nnoremap <leader>[ :action GotoSuperMethod<cr>
nnoremap <leader>u :action FindUsages<cr>
nnoremap <leader>gt :action GotoTest<cr>
nnoremap <leader>k :action HighlightUsagesInFile<cr>
nnoremap \r :action RunClass<cr>
nnoremap \R :action Run<cr>
nnoremap \t :action Rerun<cr>
"not sure about the difference
nnoremap \T :action RerunTests<cr>
nnoremap \f :action RerunFailedTests<cr>
nnoremap \d :action DebugClass<cr>
nnoremap \D :action Debug<cr>
nnoremap \c :action CheckStyleCurrentFileAction<cr>
# nnoremap \e :action FileChooser<cr>
" code refactoring
nnoremap <a-r> :action RenameElement<cr>
nnoremap <a-f> :action ReformatCode<cr>
" unimpaired mappings
nnoremap [<leader> O<esc>j
nnoremap ]<leader> o<esc>k
nnoremap [q :action PreviousOccurence<cr>
nnoremap ]q :action NextOccurence<cr>
nnoremap [m :action MethodUp<cr>
nnoremap ]m :action MethodDown<cr>
nnoremap [c :action VcsShowPrevChangeMarker<cr>
nnoremap ]c :action VcsShowNextChangeMarker<cr>
" built-in navigation to navigated items works better
nnoremap <c-o> :action Back<cr>
nnoremap <c-i> :action Forward<cr>
" but preserve ideavim defaults
nnoremap g<c-o> <c-o>
nnoremap g<c-i> <c-i>
" but preserve ideavim search
nnoremap g/ /