@woshichuanqilz
2015-10-15T06:19:47.000000Z
字数 482
阅读 1146
Vim
1. Operate on a paragraph
dap delete 1 para
d2ap delete 2 para
vap select a para
2. About the Move command
nnoremap <A-j> :m .+1<CR>==
nnoremap <A-k> :m .-2<CR>==
inoremap <A-j> <Esc>:m .+1<CR>==gi
inoremap <A-k> <Esc>:m .-2<CR>==gi
vnoremap <A-j> :m '>+1<CR>gv=gv
vnoremap <A-k> :m '<-2<CR>gv=gv
note:
1. m(ove) .+1 ----> move to the up a line
2. == ----> align
3. gi ----> jump to the last insert mode postion
4. gv ----> jump to the last visual mode postion
5. '< ----> mark the beginning of the selection
6. '> ----> mark the end of the selection