-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
85 lines (64 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
82
83
84
source ~/.vimrc
" :actionlist <command name> in IDE will search for available actions
" Alt: turn on IdeaVim: Track Action Ids in the Action Menu (see <leader>fa)
" Also https://freedium.cfd/https://towardsdatascience.com/the-essential-ideavim-remaps-291d4cd3971b
" Excellent tutorials: https://www.youtube.com/@therelentlessprogrammer
imap jk <Esc>
set relativenumber
set number
" Plugins
Plug 'preservim/nerdtree'
" Requires plugin from marketplace
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-commentary'
let mapleader=" "
set easymotion
" Easymotion / jumps
map <leader>j <Action>(AceAction)
" Manage ideavim
nnoremap <leader>E :e ~/.ideavimrc<CR>
nnoremap <leader>R :source ~/.ideavimrc<CR>
" Splitting
map <leader>V <Action>(SplitVertically)
map <leader>H <Action>(SplitHorizontally)
map <leader>U <Action>(Unsplit)
map <leader>UU <Action>(UnsplitAll)
" Use ctl+o and ctl+i
" map H :action Back<CR>
" map L :action Forward<CR>
map <leader>n <Action>(GotoNextError)
map <leader>e <Action>(SelectInProjectView)
map <leader>a <Action>(Annotate)
" Find
map <leader>fa <Action>(GotoAction)
map <leader>ff <Action>(FindInPath)
" Debugging
map <leader>dd <Action>(Debug)
map <leader>db <Action>(ToggleLineBreakpoint)
" Testing
" Runs current test
map <leader>tt <Action>(RunClass)
map <leader>tg <Action>(GotoTest)
map <leader>r <Action>(RenameElement)
map <leader>c <Action>(Stop)
map <leader>z <Action>(TogglePresentationMode)
map <leader>h <Action>(HighlightUsagesInFile)
map <leader>rr <Action>(Refactorings.QuickListPopupAction)
map <leader>ri <Action>(ShowIntentionActions)
map <leader>s <Action>(ShowUsages)
map <leader>u <Action>(FindUsages)
" Terminal
map <c-t> <Action>(ActivateTerminalToolWindow)
map <leader>T <Action>(Terminal.OpenInTerminal)
" AI
map <leader>ai <Action>(ActivateAIAssistantToolWindow)
map <leader>g <Action>(Vcs.ShowHistoryForRevision)
" Use system pasteboard
set clipboard=unnamed
" window navigation
map <C-j> <C-w>j<CR>
map <C-k> <C-w>k<CR>
map <C-h> <C-w>h<CR>
map <C-l> <C-w>l<CR>
sethandler <C-j> a:vim
sethandler <C-k> a:vim