-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
42 lines (41 loc) · 1 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
""-----------------------------------------------
" Key remappings
" ""-----------------------------------------------
"" Move each display lines
nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk
nnoremap <Down> gj
nnoremap <Up> gk
vnoremap <Down> gj
vnoremap <Up> gk
"" Move cursor to the head and tail in a current line
nnoremap <C-h> ^
nnoremap <C-l> $
vnoremap <C-h> ^
vnoremap <C-l> $
"" Exchange : and ;
nnoremap ; :
nnoremap : ;
"" Search a word from current position
nnoremap * *N
"" Toggle settings
nnoremap [toggle] <Nop>
nmap <leader>t [toggle]
nnoremap [toggle]l :set list!<CR>
nnoremap [toggle]p :set paste!<CR>
nnoremap [toggle]w :set wrap!<CR>
"" Escape insert mode using
inoremap jj <ESC>
"" Replace command snippets
nnoremap gs :<C-u>%s///g<Left><Left><Left>
vnoremap gs :s///g<Left><Left><Left>
"" Using emacs key bindings in command line mode
cnoremap <C-a> <Home>
cnoremap <C-b> <Left>
cnoremap <C-d> <Del>
cnoremap <C-e> <End>
cnoremap <C-f> <Right>
cnoremap <C-n> <Down>
cnoremap <C-p> <Up>