-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathideavimrc
119 lines (88 loc) · 3.3 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
" References:
" - Mouseless Driven Development by Hadi Hariri https://www.youtube.com/watch?v=UH6YVv9js3s
" - https://github.com/danidiaz/miscellany/blob/master/windows/.ideavimrc
" - https://github.com/JetBrains/ideavim
" - https://github.com/Valloric/dotfiles/blob/master/intellij/ideavimrc
" - https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf
" Number of command-lines that are remembered"
set history=5000
" Make search case-insensitive. Used for Cntrl-N
set ignorecase
" Override the ignorecase if the search pattern contains uppercase chars
set smartcase
" While typing the search show the pattern
set incsearch
" Highlights the matching words
set hlsearch
" Show the line numbers
set number
set relativenumber
" Lines to scroll with CTRL-U and CTRL-D
set scroll
" Message on status line to show current mode"
set showmode
" Use visual bell instead of beeping
set visualbell
" Plugins
set surround
set multiple-cursors
" These are leader-based alternative shortcuts for actions whose corresponding
" idea shortcuts require hand-stretching combinations, function keys, Home or
" Insert.
" To see the list of all available actions:
" :actionlist
" Shift + F6 in idea.
" Alt + R, then R (through the menu bar) also seems to work fine.
map <Leader>r :action RenameElement<CR>
" Ctrl + F12 in idea.
map <Leader>s :action FileStructurePopup<CR>
" Perhaps just use the Idea shortcut Ctrl-Alt-B
" Alt + N, then m (through the menu bar) also seems to work, but it is
" non-unique.
map <Leader>i :action GotoImplementation<CR>
" Alt + F7 in idea.
" Find usages in file is Ctrl + F7.
" Alt + E, then F, then U (through the menu bar) also seems to work fine.
map <Leader>u :action FindUsages<CR>
" Alt + Insert in idea.
map <Leader>g :action Generate<CR>
" F12 in idea
map <Leader>w :action JumpToLastWindow<CR>
"map <Leader>r :action ChooseRunConfiguration<CR>
" See also Ctrl + Shift + H for method hierarchy, Ctrl + Alt + H for call
" hierarchy.
map <Leader>th :action TypeHierarchy<CR>
" Same as default IDEA action, but only in insert mode. Enter block-visual
" mode in normal mode.
imap <C-v> <Esc>:action $Paste<CR>
" This is for going to related symbols.
" I can't find any effect in the community edition.
" map <Leader>g :action GotoRelated<CR>
" Can also use Ctrl-Shift-[
map <Leader>[ :action EditorCodeBlockStart<CR>
" Can also use Ctrl-Shift-]
map <Leader>] :action EditorCodeBlockEnd<CR>
" uppercase last inserted word
map <Leader>l g~iw
" Find action Ctrl-Shift-A
map <Leader>a :action GotoAction<CR>
" Find class Ctrl+n
map <Leader>c :action GotoClass<CR>
" Conflicts with FileStructurePopup. Disabling for now.
" Find symbol Ctrl+Shift+Alt+n
"map <Leader>s :action GotoSymbol<CR>
" Find File Ctrl+Shift+n
map <Leader>f :action GotoFile<CR>
map <Leader>h :action VimWindowSplitHorizontal<CR>
map <Leader>v :action VimWindowSplitVertical<CR>
map <Leader>d :action QuickJavaDoc<CR>
map J :action NextTab<CR>
map K :action PreviousTab<CR>
" Requires to override <C-j> in Preferences -> Vim emulation
map <C-k> :action VimWindowUp<CR>
map <C-j> :action VimWindowDown<CR>
map <C-h> :action VimWindowLeft<CR>
map <C-l> :action VimWindowRight<CR>
" Requires to override <C-o> in Preferences -> Vim emulation
map <C-o> :action VimMotionJumpPrevious<CR>
map <C-i> :action VimMotionJumpNext<CR>