-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
71 lines (49 loc) · 1.29 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
" vim:ft=vim
" Common settings
set nu
set relativenumber
" Perform put via IDE
set clipboard+=ideaput
" Join command will be performed via IDE
set ideajoin
" Plugins " {{{
set surround
set multiple-cursors
set commentary
set argtextobj
" Plugins settings
let g:argtextobj_pairs="[:],(:),<:>"
" }}}
" Key mappings " {{{
let mapleader=" "
let maplocalleader=" "
" save keystrokes, so we don't need to press the Shift key
nnoremap ; :
" Split line(opposite to S-J joining line)
nnoremap <silent> <C-J> gea<CR><ESC>ew
" Hard-wrap paragraphs of text
nnoremap <leader>= gqip
" Add lines above and bellow
map [<Space> O<ESC>j^
map ]<Space> o<ESC>k^
" Move lines up and down
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
" Duplicate lines
nnoremap <A-d> Yp
" IntelliJ Actions
map gcc :action CommentByLineComment<CR>
map <C-w>L :action MoveTabRight<CR>
map <C-w>J :action MoveTabDown<CR>
map <C-w>z :action MaximizeEditorInSplit<CR>
map <M-l> :action NextSplitter<CR>
map <M-h> :action PrevSplitter<CR>
map <C-p> :action GotoFile<CR>
map <leader>ee :action ActivateProjectToolWindow<CR>
map <leader>gg :action ActivateCommitToolWindow<CR>
map <M-S-R> :action Run<CR>
map <M-S-D> :action Debug<CR>
" Reload config
nnoremap \e :e ~/.ideavimrc<CR>
nnoremap \r :action IdeaVim.ReloadVimRc.reload<CR>
" }}}