-
Notifications
You must be signed in to change notification settings - Fork 1
/
ideavimrc
86 lines (67 loc) · 2 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
" IdeaVim plugin configuration for IntelliJ IDEA
let mapleader=','
" Plugins
set surround
set multiple-cursors
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmode
set number
set relativenumber
set scrolloff=3
set history=100000
set clipboard=unnamed,ideaput
" Quit insert mode
inoremap jj <Esc>
" Multiple cursors
nmap <C-n> <Plug>NextWholeOccurrence
xmap <C-n> <Plug>NextWholeOccurrence
nmap g<C-n> <Plug>NextOccurrence
xmap g<C-n> <Plug>NextOccurrence
nmap <C-x> <Plug>SkipOccurrence
xmap <C-x> <Plug>SkipOccurrence
nmap <C-p> <Plug>RemoveOccurrence
xmap <C-p> <Plug>RemoveOccurrence
" Jump back and forward
map <C-o> :action Back<CR>
map <C-i> :action Forward<CR>
" Tab operation
nnoremap <leader>q :action PreviousTab<CR>
nnoremap <leader>w :action NextTab<CR>
nnoremap gf :action GotoFile<CR>
nnoremap gt :action GotoTest<CR>
nnoremap <leader>s :action ShowIntentionActions<CR>
nnoremap <leader>g :action QuickJavaDoc<CR>
nnoremap <leader>t :action ExpressionTypeInfo<CR>
nnoremap <leader>u :action ShowUsages<CR>
nnoremap <leader>i :action GotoDeclaration<CR>
nnoremap <leader>d :action GotoImplementation<CR>
nnoremap <leader>o :action OptimizeImports<CR>
nnoremap <leader>r :action RenameElement<CR>
nnoremap <leader>e :action GotoFile<CR>
nnoremap <leader>p :action ReformatCode<CR>
nnoremap <leader>f :action FindModal<CR>
nnoremap <leader>a :action GotoNextError<CR>
nnoremap <F2> :action SelectInProjectView<CR>
nnoremap <F3> :action HideSideWindows<CR>
nnoremap <F4> :action FileStructurePopup<CR>
nnoremap <F6> :action ToggleDistractionFreeMode<CR>
" Window navigation
nnoremap <c-l> <c-w>l
nnoremap <c-j> <c-w>j
nnoremap <c-h> <c-w>h
nnoremap <c-k> <c-w>k
" Split window
nnoremap <leader>v :action SplitVertically<CR>
nnoremap <leader>h :action SplitHorizontally<CR>
" Close window
nnoremap <leader>c :q<CR>
" History
nnoremap <c-o> :action Back<CR>
nnoremap <c-i> :action Forward<CR>
" Clear search
nnoremap <leader><space> :nohlsearch<CR>
" Comment
noremap gcc :action CommentByLineComment<CR>