-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
61 lines (50 loc) · 1.44 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
let mapleader=","
set easymotion
set surround
set NERDTree
set hlsearch
set gdefault " sets global flag by default
set ignorecase
set smartcase
set scrolloff=3 " start scrolling 3 lines before edge of viewport
set visualbell
set noerrorbells
" easy window 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
nnoremap <a-h> gT
nnoremap <a-l> gt
" actions
nnoremap <leader>rr :action RenameElement<cr>
nnoremap <leader>g :action FileStructurePopup<cr>
nnoremap <leader>b :action Switcher<cr>
nnoremap <Leader>c :action CommentByLineComment<CR>
nnoremap <C-p> :action GotoFile<CR>
"like coc.nvim
nmap gd :action GotoDeclarationOnly<CR>
nmap gf :action GotoDeclaration<CR>
nmap gi :action GotoImplementation<CR>
nmap gu :action GotoSuperMethod<CR>
nmap gt :action GotoTest<CR>
nmap <C-c> :action GotoAction<CR>
" jumplists
map <C-o> <Action>(Back)
map <C-i> <Action>(Forward)
map g; <Action>(JumpToLastChange)
map g, <Action>(JumpToNextChange)
" unimpaired mappings
nnoremap [<space> O<esc>j
nnoremap ]<space> o<esc>k
nnoremap [q :action PreviousOccurence<cr>
nnoremap ]q :action NextOccurence<cr>
nnoremap [m :action MethodUp<cr>
nnoremap ]m :action MethodDown<cr>
nnoremap [c :action VcsShowPrevChangeMarker<cr>
nnoremap ]c :action VcsShowNextChangeMarker<cr>
" easymotion
nmap <Leader>w <Plug>(easymotion-w)
nmap <Leader>W <Plug>(easymotion-b)
" nerdtree
nnoremap <Leader>t :NERDTree<CR>