/
.ideavimrc
43 lines (36 loc) · 1.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
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
let mapleader=" "
set scrolloff=5
set incsearch
set ignorecase
set smartcase
set hlsearch
set nu
set relativenumber
" Don't use Ex mode, use Q for formatting.
map Q gq
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
Plug 'machakann/vim-highlightedyank'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
map <C-s> <Action>(ReformatCode) \| <Action>(SaveAll)
map <leader>a <Action>(GotoAction)
map <leader>c <Action>(CloseContent)
map <leader>/ <Action>(CommentByLineComment)
map <leader>ff <Action>(GotoFile)
map <leader>fr <Action>(RecentFiles)
map <leader>fw <Action>(FindInPath)
map <leader>fb <Action>(Switcher)
map <leader>bc <Action>(CloseAllEditorsButActive)
map <leader>lr <Action>(RenameElement)
map gr <Action>(FindUsages)
map gi <Action>(GotoImplementation)
map gt <Action>(RunClass)
map [f <Action>(MethodUp)
map ]f <Action>(MethodDown)
map [b <Action>(PreviousTab)
map ]b <Action>(NextTab)