在VIM的插入模式中自由移动

在vimrc中加入如下代码即可


inoremap <C-A> <Esc>^i
inoremap <C-E> <Esc>$i


inoremap <C-L> <Right>
inoremap <C-H> <Left>
inoremap <C-J> <Down>
inoremap <C-K> <Up>

"move to next word
inoremap <C-F> <Esc>wwwi

"move to prev word
inoremap <C-B> <Esc>bi

"del current char
inoremap <C-D>x <Esc>lxi

"del current word
inoremap <C-D>w <Esc>ldwi

"del current line
inoremap <C-D>l <Esc>ddi

"del content from x to line end
inoremap <C-D>e <Esc>lc$

"del content from x to line end
inoremap <C-D>a <Esc>lc^



你可能感兴趣的:(vim)