-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
70 lines (53 loc) · 1.64 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
set number
set noerrorbells
set incsearch
set scrolloff=5
" highlight copied text
Plug 'machakann/vim-highlightedyank'
" file tree navigation
Plug 'preservim/nerdtree'
" useful remaps
inoremap jj <Esc>
let mapleader = " "
" function keys
map <f9> :action Debug<CR>
map <f10> :action Run<CR>
" search
map <leader>sa :action GotoAction<CR>
map <leader>sc :action GotoClass<CR>
map <leader>sf :action GotoFile<CR>
map <leader>sg :action FindInPath<CR>
" buffer
nmap <leader>bv :action SplitVertically<CR>
nmap <leader>bh :action SplitHorizontally<CR>
nmap <leader>tf :action ActivateTerminalToolWindow<CR>
nmap <c-w>r :action MoveEditorToOppositeTabGroup<CR>
nmap <c-q> :action CloseAllEditors<CR>
" navigation
nmap gd :action GotoDeclaration<CR>
nmap gI :action GotoImplementation<CR>
nmap gr :action FindUsages<CR>
nmap gs :action GotoSuperMethod<CR>
nmap ]i :action GotoNextError<CR>
nmap [i :action GotoPreviousError<CR>
" code actions
map <leader>cf :action ReformatCode<CR>
map <leader>ca :action ShowIntentionActions<CR>
nmap <leader>cb :action ToggleLineBreakpoint<CR>
nmap <leader>cr :action Run<CR>
" completion
imap <C-y> :action EditorChooseLookupItem<CR>
imap <C-n> :action EditorDown<CR>
imap <C-p> :action EditorUp<CR>
" find files in project view
nmap <leader>fl :action SelectInProjectView<CR>
nmap <leader>fe :action ActivateProjectToolWindow<CR>
nmap <leader>fs :action ActivateStructureToolWindow<CR>
" yank
nmap <leader>yr :action CopyReference<CR> :let @" = @+ <CR>
" utils
nmap <leader><leader> :action Switcher<CR>
nmap <leader>rn :action RenameElement<CR>
nmap P :action EditorPaste<CR>
vmap P :action EditorPaste<CR>
vmap Y "+y