-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
71 lines (56 loc) · 1.22 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
" =================
" plugin
" =================
set surround
" =================
" settings
" =================
set scrolloff=4
set showmode
set hlsearch
set incsearch
set ignorecase
" =================
" key remap
" =================
" leader key
let mapleader = ','
let g:mapleader = ','
" command mode
cnoremap <C-A> <HOME>
cnoremap <C-E> <END>
cnoremap <C-B> <LEFT>
cnoremap <C-D> <DEL>
cnoremap <C-F> <RIGHT>
cnoremap <C-H> <BS>
cnoremap <C-N> <DOWN>
cnoremap <C-P> <UP>
cnoremap <ESC><C-B> <S-LEFT>
cnoremap <ESC><C-F> <S-RIGHT>
" fast save
nmap <Leader>s :w<CR>
" close tab
nmap <Leader>w :action CloseContent<CR>
" go to definition
nmap g] <C-]>
nmap g[ <C-T>
" identation
nmap g. v>
nmap g, v<
vmap g. >gv
vmap g, <gv
" move lines up and down using ctrl+[jk]
nmap <C-J> mz:m+<CR>`z
nmap <C-K> mz:m-2<CR>`z
vmap <C-J> :m'>+<CR>`<my`>mzgv`yo`z
vmap <C-K> :m'<-2<CR>`>my`<mzgv`yo`z
" move to the prev or next tab using ctrl+[hl]
nmap <C-H> :tabprevious<CR>
nmap <C-L> :tabnext<CR>
" cancel searched highlight
nmap <Leader><Space> :nohlsearch<CR>
" navigate
nmap <C-P> :action GotoFile<CR>
nmap <Leader>r :action FileStructurePopup<CR>
nmap <Leader>t :action GotoSymbol<CR>
nmap <Leader>kb :action ActivateProjectToolWindow<CR>