-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
81 lines (68 loc) · 2.04 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
" .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
" Do incremental searching.
set incsearch
" Don't use Ex mode, use Q for formatting.
map Q gq
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'
Plug 'machakann/vim-highlightedyank'
" Space as leader key
nnoremap <SPACE> <Nop>
let mapleader=" "
" Options
set clipboard+=unnamed
set hlsearch
set ignorecase
set smartcase
set notimeout
set timeoutlen=5000
set undolevels=10000
set number
set norelativenumber
set scrolloff=8
set sidescrolloff=8
set showmode
" Recommended ideavim settings
set ideajoin
set ideamarks
" Plugins
set surround
set NERDTree
set commentary
set which-key
set highlightedyank
" Code navigation keymaps
nmap <C-o> <Action>(Back)
nmap <C-i> <Action>(Forward)
nmap gd <Action>(GotoDeclaration)
nmap gI <Action>(GotoImplementation)
nmap gu <Action>(FindUsages)
nmap gl <Action>(ShowErrorDescription)
map gh <Action>(CallHierarchy)
" Other windows access
nmap <Leader>e :NERDTreeFocus<CR>
nmap <Leader>s <Action>(FileStructurePopup)
nmap <Leader><Space> <Action>(SearchEverywhere)
nmap <Leader>fg <Action>(FindInPath)
nmap <Leader>b :buffers<cr>
nmap <Leader>r :registers<cr>
nmap <Leader>al :actionlist<space>
nmap <Leader>xx <Action>(ActivateProblemsViewToolWindow)
nmap <Leader>wr <Action>(ActivateRunToolWindow)
nmap <Leader>wg <Action>(ActivateVersionControlToolWindow)
nmap <Leader>wc <Action>(ActivateCommitToolWindow)
nmap <Leader>wn <Action>(ActivateNotificationsToolWindow)
nmap <Leader>wnc <Action>(ClearAllNotifications)
" Perform actions in code
nmap <Leader>ca <Action>(ShowIntentionActions)
nmap <Leader>cr <Action>(RenameElement)
nmap <Leader>cf <Action>(ReformatCode)
nmap <Leader>cg <Action>(Generate)
vmap <Leader>cv <Action>(IntroduceVariable)
vmap <Leader>cm <Action>(ExtractMethod)