-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathideavimrc
More file actions
59 lines (44 loc) · 1.58 KB
/
Copy pathideavimrc
File metadata and controls
59 lines (44 loc) · 1.58 KB
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
" ~/.ideavimrc
" ideavim reference: https://github.com/JetBrains/ideavim/blob/master/doc/set-commands.md
" useful: `set trackactionids`
" action reference: https://github.com/centic9/IntelliJ-Action-IDs
inoremap jk <Esc>
set nocursorline
set hlsearch
set incsearch
set clipboard^=unnamed
set smartcase
set ignorecase
set scrolloff=5
set visualbell
set ideajoin
" enables tcomment_vim-style comment-toggle bindings, e.g. `v_gc`, `gcc`
set commentary
" redraw window so search terms are centered
nnoremap n nzz
nnoremap N Nzz
nnoremap <Space>hl :set hlsearch! hlsearch?<CR>
nnoremap <Space>ih :action ToggleInlayHintsGloballyAction<CR>
nnoremap <Space>zn :action ToggleZenMode<CR>
nnoremap <Space>vf :action SelectInProjectView<CR>
nnoremap <Space>T :action ReopenClosedTab<CR>
nnoremap <Space>wo :action Unsplit<CR>
nnoremap <Space>sl :action OpenInRightSplit<CR>
nnoremap <Space>sj :action SplitHorizontally<CR>
nnoremap <Space>tw :setlocal wrap!<CR>
nnoremap _$ :%s/\s\+$//e<CR>
" fix broken <C-{o,i}> when navigating inside of decompiled classes
nnoremap <C-o> :action Back<CR>
nnoremap <C-i> :action Forward<CR>
nnoremap <Space>D :action ShowHoverInfo<CR>
nnoremap <Space>gd :action GotoDeclaration<CR>
nnoremap <Space>gi :action GotoImplementation<CR>
nnoremap <Space>gl :action GotoDeclarationOnly<CR>
nnoremap <Space>re :action FindUsages<CR>
nnoremap <Space>rre :action ShowUsages<CR>
nnoremap <Space>im :action OptimizeImports<CR>
nnoremap <Space>qq :q<CR>
" rust
inoremap <buffer> ;; ::
" note: ideavim's `inoremap` implementation isn't 1:1 with vims' behaviour
" inoremap <buffer> sst String