-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_ideavimrc
70 lines (57 loc) · 1.17 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
set nowrapscan
set ignorecase
set hlsearch
set scrolloff=8
set number
set visualbell
set noerrorbells
inoremap <C-]> <Esc>
"選択範囲のインデントを連続して変更
vnoremap < <gv
vnoremap > >gv
" Bash like insert
inoremap <C-a> <C-o>^
inoremap <C-e> <C-o>$<Right>
inoremap <C-b> <Left>
inoremap <C-f> <Right>
inoremap <C-n> <Down>
inoremap <C-p> <Up>
inoremap <C-h> <BS>
inoremap <C-d> <Del>
inoremap <C-k> <C-o>D<Right>
inoremap <C-u> <C-o>d^
" # <Tab> {{{
"nnoremap tn :<C-u>tabnew<Space>
nnoremap <Tab> gt
nnoremap <S-Tab> gT
" }}}
" # Yank {{{
" Like nmap 'D' and 'C'
nnoremap Y y$
" カーソル位置の単語をヤンクした単語に置換
nnoremap <silent> cy ciw<C-r>0<ESC>:let@/=@1<CR>:noh<CR><ESC>
nnoremap <silent> ciy ce<C-r>0<ESC>:let@/=@1<CR>:noh<CR><ESC>
" }}}
" for snippet complete
nnoremap j gj
onoremap j gj
xnoremap j gj
nnoremap k gk
onoremap k gk
xnoremap k gk
nnoremap gj j
nnoremap gk k
cnoremap <C-a> <Home>
cnoremap <C-e> <End>
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
cnoremap <C-l> <C-d>
cnoremap <C-d> <Delete>
" # Switch ; <-> :
nnoremap ; :
nnoremap : ;
vnoremap ; :
vnoremap : ;
nnoremap q; q:
vnoremap q; q:
set clipboard=unnamed