This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ideavimrc
78 lines (67 loc) · 2.21 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
" https://github.com/saaguero/ideavimrc/blob/master/.ideavimrc
" run in iterm first: defaults write com.jetbrains.intellij ApplePressAndHoldEnabled -bool false
set hlsearch
set scrolloff=8
set ignorecase
set smartcase
set showcmd
set showmode
set history=1000
set clipboard+=unnamed
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
" clear the search buffer when hitting return
nnoremap <space><cr> :nohlsearch<cr>
" options
nnoremap cow :action EditorToggleUseSoftWraps<cr>
nnoremap col :action EditorToggleShowWhitespaces<cr>
" 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>
" code refactoring
nnoremap <space>rr :action RenameElement<cr>
" unimpaired mappings
nnoremap [<space> O<esc>j
nnoremap ]<space> 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>
" built in search looks better
"nnoremap / :action Find<cr>
" but preserve ideavim search
nnoremap g/ /
" built in save will trigger plugin Save Actions
nnoremap <space>w :action SaveAll<cr>