-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_ideavimrc
137 lines (105 loc) · 3.01 KB
/
dot_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
"Map leader key before all plugins
let mapleader=" "
set ignorecase
set smartcase
set visualbell
set surround
set commentary
set ideajoin
set NERDTree
" set which-key
set relativenumber
set number
set timeoutlen=10
" set multicursor
" Use helix comment keybind
vnoremap <Leader>c :action CommentByLineComment
nnoremap <Leader>c :action CommentByLineComment
vnoremap <C-c> :action CommentByLineComment
nnoremap <C-c> :action CommentByLineComment
" Map <C-L> (redraw screen) to also turn off search highlighting until the
" next search
nnoremap <Leader>h :nohl<CR><C-L>
" map jk to <ESC> when in insert mode
inoremap jk <Esc>
" mm to match brackets
nnoremap mm %
vnoremap mm %
" d is for delete
nnoremap d "_d
nnoremap D "_D
vnoremap d "_d
vnoremap D "_D
" p is for paste
xnoremap p P
" quick movements
inoremap II <Esc>I
inoremap AA <Esc>A
inoremap OO <Esc>O
nnoremap <S-l> gt
nnoremap <S-h> gT
nnoremap <C-l> <C-w>l
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
" Helix goto mode
nnoremap gs ^
nnoremap gh 0
nnoremap gl $
" disable the timeout option
set notimeout
" increase the which key timeout (default: 1000)
" set timeoutlen = 7890
" Use system clipboard
set clipboard+=unnamed
" Equal to Nvim Tree file explorer mapping
"
" nnoremap <Leader>e :action SelectInProjectView<CR>
"
nnoremap <Leader>e :NERDTreeFind<CR>
nnoremap <Leader>o :action ActivateStructureToolWindow<CR>
" similar to trouble configuration
"
:map <Leader>tt <Action>(ActivateProblemsViewToolWindow)
:map ]d <Action>(GotoNextError)
:map [d <Action>(GotoPreviousError)
nnoremap <Leader>rn :action RenameElement<CR>
nnoremap <Leader><C-h> :action TypeHierarchy<CR>
" Git related mappings
"
" Move to next/last change (hunk)
" Whats a hunk: http://www.gnu.org/software/diffutils/manual/html_node/Hunks.html
" Unlike gitgutter Jumps are based on timeline not line number in file
"
:map ]h <Action>(VcsShowNextChangeMarker)
:map [h <Action>(VcsShowPrevChangeMarker)
" similar to nvim telescope config
"
nnoremap <Leader>b :action RecentFiles<CR>
nnoremap <Leader>j :action RecentLocations<CR>
nnoremap <Leader>f :action GotoFile<CR>
" nnoremap <Leader>st :action FindInPath<CR>
" nvim-lsp config mappings
"
nnoremap gr :action FindUsages<CR>
nnoremap gI :action GotoImplementation<CR>
nnoremap gD :action GotoDeclaration<CR>
nnoremap <Leader>sS :action GotoSymbol<CR>
nnoremap <Leader>ss :action FileStructurePopup<CR>
nnoremap <Leader>lo :action ActivateStructureToolWindow<CR>
nnoremap gp :action QuickImplementations<CR>
" similar to nvim dap configuration
"
nnoremap <Leader>dt :action ToggleLineBreakpoint<CR>
nnoremap <Leader>dl :action EditorPopupMenuDebug<CR>
nnoremap <Leader>ds :action Debug<CR>
nnoremap <Leader>de :action Debugger.EvaluationDialogPopup<CR>
nnoremap <C-p> :action ParameterInfo<CR>
" Open project switcher
"
nmap <leader>P :action ManageRecentProjects<cr>
" Toggle terminal
nnoremap <C-t> :action ActivateTerminalToolWindow<CR>
" Window splitting
nnoremap <c-\> :action SplitVertically<CR>
nnoremap <c--> :action SplitHorizontally<CR>