-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathideavimrc
56 lines (52 loc) · 2.07 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
"""IDEAVIMCOMMON
nnoremap <Space>n :NERDTreeToggle<CR>
" remove need to shift to enter command. TODO fix clash with repeat.vim.
nnoremap ; :
vnoremap ; :
nnoremap <Space>x :x<cr>
nnoremap <Space>u :up<cr>
set hls incsearch " highlight search and incrementally while typing.
nnoremap <Space><Space> <C-w>
map tdmb A// TODO(mattb):<Space>
nnoremap <Space>i <C-i>
nnoremap <Space>o <C-o>
" swap # and * since # is one key on uk layout so prefer forward
nnoremap # *
nnoremap * #
"""END IDEVIMCOMMON
"""IDEAVIMLIKE Keybinds to IDEA functionality rather than VIM actions.
noremap zr :up<cr>:action Run<cr>
noremap zd :up<cr>:action Debug<cr>
noremap <Space>f :action GotoFile<cr>
noremap <Space>a :action GotoAction<cr>
noremap <Space>s :action GotoSymbol<cr>
noremap <Space>t :action GotoType<cr>
noremap <Space>; :action FileStructurePopup<cr>
" nnoremap <Space><Space> :action GotoAll<cr>
noremap <Space>F :action FindInPath<cr>
noremap <Space>b :action GotoDeclaration<cr>
noremap <Space>e :action RecentFiles<cr>
noremap <Space>] :action Back<cr>
noremap <Space>[ :action Forward<cr>
noremap <Space>l :action ReformatCode<cr>
noremap <Space>r :action RenameElement<cr>
noremap <Space>p :action ActivateProblemsViewToolWindow<cr>
noremap <Space>t :action RunClass<cr>
noremap <Space>j :action ShowIntentionActions<cr>
"""END IDEAVIMLIKE
""" everything after is :
noremap <Space>h :action ShowErrorDescription<cr>
# set sneak " must be set before set quickscope for ideavim.
set quickscope " Plugin must be installed manually for IDEAvim.
"""PLUGSHARED
Plug 'preservim/nerdtree' " map to IDEA file tree bindings eg hjkl navigation etc.
Plug 'machakann/vim-highlightedyank'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround' " Clashes with sneak.
Plug 'tommcdo/vim-exchange'
Plug 'chrisbra/matchit'
" Plug 'justinmk/vim-sneak' " Plugin must be installed manually for IDEAvim. Conflicts with surround which imo is more useful than sneak given f,t,/ or exists for navigation
let g:sneak#label = 1
Plug 'unblevable/quick-scope' " Plugin must be installed manually for IDEAvim.
Plug 'tpope/vim-repeat'
"""ENDPLUGSHARED