-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_ideavimrc
71 lines (54 loc) · 1.63 KB
/
dot_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
" List of commands here: https://github.com/JetBrains/ideavim/wiki/set-commands
" More examples here: https://github.com/JetBrains/ideavim/discussions/303
nnoremap <silent> <Space> <Nop>
let mapleader="\<space>"
let leader = "\<space>"
set relativenumber
set hlsearch
set ignorecase
set smartindent
set smartcase
set incsearch
set splitbelow
set splitright
set scrolloff=5
" https://github.com/JetBrains/ideavim/wiki/set-commands
set multiple-cursors
nmap <CR> ciw
nmap <ESC> :nohls<CR>
nmap <S-l> :action NextTab<CR>
nmap <S-h> :action PreviousTab<CR>
nmap <leader>sf :action GotoFile<CR>
nmap <leader>sg :action FindInPath<CR>
nmap <leader>sa :action GotoAction<CR>
nmap <leader>ss :action GotoSymbol<CR>
noremap <silent> <A-j> :m.+1<CR>==
noremap <silent> <A-k> :m.-2<CR>==
xnoremap <silent> <A-j> :m'>+1<CR>gv=gv
xnoremap <silent> <A-k> :m'<-2<CR>gv=gv
imap <silent> jj <ESC>
imap <silent> jk <ESC>
nmap <left> <Nop>
nmap <right> <Nop>
nmap <up> <Nop>
nmap <down> <Nop>
" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
" debug
nmap <leader>dr <Action>(Run)
nmap <leader>ds <Action>(Stop)
nmap <leader>dc <Action>(ContextDebug)
nmap <leader>dd <Action>(Debug)
nmap <leader>db <Action>(ToggleLineBreakpoint)
nmap <leader>de <Action>(EditBreakpoint)
nmap <leader>dv <Action>(ViewBreakpoints)
nmap gr :action ShowUsages<CR>
nmap gd :action GotoDeclaration<CR>
nmap gi :action GotoImplementation<CR>