-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
146 lines (125 loc) · 3.74 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
let mapleader=" "
""" set clipboard+=unnamed
set ignorecase
"" Don't use Ex mode, use Q for formatting.
map Q gq
""" Map leader to space ---------------------
""" Plugins --------------------------------
set sneak
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
set textobj-entire
set ReplaceWithRegister
set highlightedyank
"set which-key
set NERDTree
""" Plugin settings -------------------------
let g:argtextobj_pairs="[:],(:),<:>"
""" Common settings -------------------------
set showmode
set so=5
set incsearch
set nu
""" Idea specific settings ------------------
set ideajoin
set ideastatusicon=gray
set idearefactormode=keep
" Toggle search hilighting
map <silent> <F11> :set invhlsearch<CR>
imap <silent> <F11> <C-o>:set invhlsearch<CR>
vmap <silent> <F11> :<C-u>set invhlsearch<CR>gv
""" Normal mappings --------------------------------
nnoremap sq :q! <cr>
map <leader>c :q! <cr>
map <C-c> :action HideActiveWindow<cr>
nnoremap q <ESC>
vnoremap q <ESC>
nnoremap <leader>w :w!<CR>
" Easy window sqlit navigation {{{
nnoremap <C-j> <C-w>
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-h> <C-w>h
nnoremap sj <C-w>
nnoremap sk <C-w>k
nnoremap sl <C-w>l
nnoremap sh <C-w>h
nnoremap ss :split<Return><C-w>w
nnoremap sv :vsplit<Return><C-w>w
nmap <leader>q :q <cr>
""" Insert mappings
inoremap jk <ESC>
""" Mappings --------------------------------
nmap m <Plug>(easymotion-s)
"""nmap ml <Plug>(easymotion-f)
""" map sh :
""" Find
nmap <leader>f :action GotoFile<cr>
nmap <leader>fr :action RecentFiles<cr>
nmap <leader>fe :action SearchEverywhere<cr>
nmap <leader>fa :action GotoAction<cr>
nmap <leader>fs :action FindInPath<cr>
" NERDTree
nmap <leader>e :NERDTreeToggle<cr>
nmap <leader>nf :NERDTreeFind<cr>
""" Buffer control
nmap <leader>bh :action CloseAllToTheLeft<cr>
nnoremap <s-TAB> :action PreviousTab<CR>
nnoremap <TAB> :action NextTab<CR>
"" LSP
nmap <leader>lr :action RenameElement<cr>
nmap <leader>la :action QuickFixes<cr>
nmap <leader>ls :action GotoSymbol<cr>
nmap <leader>lp :action ActivateProblemsViewToolWindow<cr>
nmap <leader>lj :action GotoNextError<cr>
nmap <leader>lk :action GotoPreviousError<cr>
nmap K :action QuickJavaDoc<cr>
" Navigation
nmap gu :action FindUsages<cr>
nmap gi :action GotoImplementation<cr>
nmap gc :action GotoClass<cr>
nmap gp :action GotToSuperMethod<CR>
nmap gs :action GotoSymbol<cr>
nmap ge :action SelectIn<cr>
nmap mt :action ToggleBookmark<cr>
nmap ms :action ShowBookmarks<cr>
nmap <leader>h :action Back<cr>
nmap <leader>l :action Forward<cr>
" Useful Git actions
nmap <leader>gb :action Git.Branches<cr>
nmap <leader>gp :action Git.Pull<cr>
nmap <leader>gu :action Git.Push<cr>
nmap <leader>gr :action Git.Rebase<cr>
nmap <leader>gm :action Git.Merge<cr>
" Refactorings
vmap <leader>ra :action Refactorings.QuickListPopupAction<cr>
vmap <leader>re :action ExtractMethod<cr>
nmap <leader>rg :action Generate<cr>
nmap <leader>ro :action OptimizeImports<cr>
" Inspection
nmap <leader>rc :action InspectCode<cr>
""" Terminal
map <C-\> :action ActivateTerminalToolWindow<cr>
" Search
nmap <leader>/ :action Find<cr>
nmap <leader>\ :action FindInPath<cr>
" Moving lines
"nmap <C-k> :action MoveLineUp<cr>
"nmap <C-j> :action MoveLineDown<cr>
" Moving statements
"nmap <A-k> :action MoveStatementUp<cr>
"nmap <A-j> :action MoveStatementDown<cr>
" Building, Running and Debugging
nmap <leader>ds :action Debug<cr>
nmap <leader>db :action ToggleLineBreakpoint<cr>
" nmap <leader>dv :action ParameterInfo<cr>
nmap <leader>dj :action StepOver<cr>
nmap <leader>di :action StepInto<cr>
nmap <leader>do :action StepOut<cr>
nmap <leader>dc :action RunToCursor<cr>
nmap <leader>dv :action QuickEvaluateExpression<cr>
vmap <leader>dv :action QuickEvaluateExpression<cr>
nmap <leader>da :action ViewBreakpoints<cr>