-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.keymap
96 lines (85 loc) · 2.31 KB
/
.vimrc.keymap
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
" -- // vimrc
noremap <C-d>e :<C-u>edit $MYVIMRC<cr>
noremap se :<C-u>edit $MYVIMRC<cr>
noremap sk :<C-u>edit ~/wk/dot/.vimrc.keymap<cr>
noremap sp :<C-u>edit ~/wk/dot/.vimrc.plug<cr>
noremap ss :<C-u>edit ~/wk/dot/.vimrc.set<cr>
noremap <C-d>s :<C-u>write<cr>:<C-u>source $MYVIMRC<cr>
noremap sr :<C-u>write<cr>:<C-u>source $MYVIMRC<cr>
" -- // keymap
let mapleader = "\<Space>"
"<Leader>a :echo "Hello"<CR>
nnoremap <Space> <Nop>
let maplocalleader=" "
noremap x "_x
" for us keyboard
nnoremap ; :
nnoremap : ;
vnoremap ; :
vnoremap : ;
" cancellation
noremap <C-j> <esc>
"noremap! <C-j> <esc>
inoremap <C-j> <esc>
"cnoremap <C-j> <esc>
"noremap! jj <esc>
nnoremap <silent><esc> :nohlsearch<cr>
nnoremap <esc><esc> :nohlsearch<cr>
nnoremap <C-j> :nohlsearch<cr>
"nnoremap jj :nohlsearch<cr>
" cursor move
noremap j gj
noremap k gk
noremap <S-h> ^
noremap <S-l> $
noremap <S-j> }
noremap <S-k> {
noremap <C-a> <home>
noremap! <C-a> <home>
noremap <C-e> <end>
noremap! <C-e> <end>
" edit utility
"nnoremap <cr> o<esc>
"inoremap [ []<left>
"inoremap ( ()<left>
"inoremap { {}<left>
"yankround
nmap <silent>p <Plug>(yankround-p)
nmap <silent>P <Plug>(yankround-P)
nmap gp <Plug>(yankround-gp)
nmap gP <Plug>(yankround-gP)
nmap <C-p> <Plug>(yankround-prev)
nmap <C-n> <Plug>(yankround-next)
" neosnippet
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
"inoremap <expr><tab> pumvisible() ? "\<C-n>" :
" \ neosnippet#expandable_or_jumpable() ?
" \ "\<Plug>(neosnippet_expand_or_jump)" : "\<tab>"
snoremap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
" window control
set splitright
set splitbelow
noremap <C-s> :<C-u>vsplit<cr>
noremap! <C-s> <esc> :<C-u>vsplit<cr>
noremap <C-l> <C-w>l
noremap <C-j><C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-h> <C-w>h
"noremap! <C-l> <C-w>l
"noremap! <A-j> <C-w>j
"noremap! <A-k> <C-w>k
"noremap! <C-h> <C-w>h
"noremap <C-\> <C-w>|
"noremap <C-^> <C-w>=
" tab control
noremap <S-t> :<C-u>tabnew<cr>
"noremap <C-t> :<C-u>tabnew<cr>:<C-u>cd<cr>:<C-u>FZF<cr>
"noremap <C-t> :<C-u>tabnew<cr>:<C-u>Denite -resume -immediately <cr>
"noremap <C-t> :<C-u>Denite buffer -immediately -default-action=tabopen <cr>
noremap <A-tab> gt
noremap! <A-tab> gt
noremap <S-tab> gT
noremap! <S-tab> gT