-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
58 lines (44 loc) · 1.09 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
" highlighten matched
set hlsearch
" incremental search
set incsearch
" disable search highlight
nnoremap <ESC><ESC> :nohlsearch<CR>
nnoremap <C-g><C-g> :nohlsearch<CR>
" case insensitive search
set ignorecase
" case sensitive search if search word contains large letter
set smartcase
" cursor movement in insert mode
inoremap <C-b> <Left>
inoremap <C-f> <Right>
" editing in insert mode
inoremap <silent> <C-h> <BS>
inoremap <silent> <C-d> <Del>
inoremap <silent> <C-k> <Esc>lc$
inoremap <silent> <C-a> <C-o>0
inoremap <silent> <C-e> <C-o>$
" Enter to insert new line
nnoremap <CR> o<ESC>
" space to add space
nnoremap <Space> i<Space><Esc>
" ^g to cancel at any mode
inoremap <silent> <C-g> <ESC>
nnoremap <silent> <C-g> <ESC>
cnoremap <silent> <C-g> <ESC>
"""""""""""""""""""""""""""""""""""""""
" window operations
"""""""""""""""""""""""""""""""""""""""
nnoremap s <Nop>
" devide
nnoremap ss :<C-u>sp<CR><C-w>j
nnoremap sv :<C-u>vs<CR><C-w>l
" move cursor
nnoremap sh <C-w>h
nnoremap sj <C-w>j
nnoremap sk <C-w>k
nnoremap sl <C-w>l
nnoremap sw <C-w>w
" change tab
nnoremap <C-l> gt
nnoremap <C-h> gT