-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
132 lines (111 loc) · 3.74 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
" Must be done first to tell other plugins that this is the leader key
let mapleader=" "
" https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins
set clipboard+=unnamed
set clipboard+=ideaput
set ideajoin
set idearefactormode=keep
set incsearch
" set relativenumber
set showmode
set hlsearch
set surround
set visualbell
set commentary
set highlightedyank
set argtextobj
set matchit
set multiple-cursors
" requires easymotion and ace-jump plugins
set easymotion
" requires quickscope plugin
set quickscope
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
nmap \e :e ~/.ideavimrc<CR>
nmap \r <Action>(IdeaVim.ReloadVimRc.reload)
nmap <s-u> <Action>($Redo)
nmap <c-z> <Action>(ToggleDistractionFreeMode)
nmap <c-c> <Action>(CommentByLineComment)
xmap <c-c> <Action>(CommentByLineComment)
nmap <c-t> <Action>(ActivateTerminalToolWindow)
nmap <leader>t <Action>(Terminal.OpenInTerminal)
nmap <c-w>v <Action>(SplitVertically)
nmap <c-w>s <Action>(SplitHorizontally)
nmap <c-w>W <Action>(MoveEditorToOppositeTabGroup)
nmap <c-w>w <Action>(NextWindow)
nmap <leader>q <Action>(CloseContent)
nmap <leader>Q <Action>(CloseAllEditors)
nmap <leader>x <Action>(HideAllWindows)
nmap ]d <Action>(GotoNextError)
nmap [d <Action>(GotoPreviousError)
nmap ]g <Action>(VcsShowNextChangeMarker)
nmap [g <Action>(VcsShowPrevChangeMarker)
nmap ]m <Action>(MethodDown)
nmap [m <Action>(MethodUp)
nmap <leader>r <Action>(Refactorings.QuickListPopupAction)
nmap <leader>= <Action>(ReformatCode)
nmap <leader>j <Action>(RecentLocations)
nmap gr <Action>(FindUsages)
nmap gi <Action>(GotoImplementation)
nmap gd <Action>(GotoDeclaration)
nmap gT <Action>(GotoTest)
nmap gp <Action>(GotoSuperMethod)
nmap gy <Action>(GotoTypeDeclaration)
nmap gh 0
nmap gs ^
nmap gl $
nmap ge G
xmap gh 0
xmap gs ^
xmap gl $
xmap ge G
nmap <leader>S <Action>(GotoSymbol)
nmap <leader>s <Action>(FileStructurePopup)
nmap <leader>F <Action>(FindInPath)
nmap <leader>f <Action>(GotoFile)
nmap <c-f> <Action>(ActivateFindToolWindow)
nmap <leader>e <Action>(SearchEverywhere)
nmap <leader>o <Action>(ActivateProjectToolWindow)
nmap <leader>a <Action>(ShowIntentionActions)
nmap <leader>p <Action>(PasteMultiple)
nmap <leader>z <Action>(ChangeIdeScale)
nmap <leader>g <Action>(Vcs.QuickListPopupAction)
nmap <leader>b <Action>(RecentChangedFiles)
nmap <leader>B <Action>(RecentFiles)
nmap <leader><cr> :nohlsearch<CR>
nmap <c-o> <Action>(Back)
nmap <c-i> <Action>(Forward)
nmap <s-k> <Action>(ExpressionTypeInfo)
nmap <c-k> <Action>(ShowErrorDescription)
nmap <s-c-k> <Action>(QuickJavaDoc)
nmap <leader>uh <Action>(ToggleInlayHintsGloballyAction)
nmap <leader>uw <Action>(EditorToggleShowWhitespaces)
nmap <leader>y <Action>(CopyReferencePopupGroup)
" Remap multiple-cursors shortcuts to match terryma/vim-multiple-cursors
nmap <C-n> <Plug>NextWholeOccurrence
" Does not work on column selection mode
xmap <C-n> <Plug>NextWholeOccurrence
nmap g<C-n> <Plug>NextOccurrence
xmap g<C-n> <Plug>NextOccurrence
nmap <C-x> <Plug>SkipOccurrence
xmap <C-x> <Plug>SkipOccurrence
nmap <C-p> <Plug>RemoveOccurrence
xmap <C-p> <Plug>RemoveOccurrence
" Note that the default <A-n> and g<A-n> shortcuts don't work on Mac due to dead keys.
" <A-n> is used to enter accented text e.g. ñ
" Alternatively use the Unicode hex keyboard in macOS
nmap <S-C-n> <Plug>AllWholeOccurrences
xmap <S-C-n> <Plug>AllWholeOccurrences
nmap g<S-C-n> <Plug>AllOccurrences
xmap g<S-C-n> <Plug>AllOccurrences
""" Running and Debugging
nmap ,r <Action>(ContextRun)
nmap ,c <Action>(RunClass)
nmap ,f <Action>(ChooseRunConfiguration)
nmap ,t <Action>(ActivateRunToolWindow)
nmap ,u <Action>(Rerun)
nmap ,f <Action>(RerunFailedTests)
nmap ,b <Action>(ToggleLineBreakpoint)
nmap ,d <Action>(ContextDebug)
nmap ,n <Action>(ActivateDebugToolWindow)
nmap ,p <Action>(XDebugger.AttachToProcess)