forked from patrickcjh/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
55 lines (38 loc) · 1.33 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
"" Source your .vimrc
"source ~/.vimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Do incremental searching.
set incsearch
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
" Don't use Ex mode, use Q for formatting.
map Q gq
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
map <leader>af <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
" Find more examples here: https://jb.gg/share-ideavimrc
map <Space> <Leader>
nnoremap gq :tabc<CR>
" Allow you to easily search the current word.
nnoremap <Leader>ff yiw/<C-r>"<CR>
vnoremap <Leader>ff y/<C-r>"<CR>
" pane navigation
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Avoid pressing shift key to switch to previous tab
noremap gr gT
vmap gc <Action>(CommentByLineComment)
nmap gcc <Action>(CommentByLineComment)
nmap <C-Space> <Action>(FileChooser.TogglePathShowing)
" Stay in visual mode when indenting. You will never have to run gv after performing an indentation.
vnoremap < <gv
vnoremap > >gv