[关闭]
@woshichuanqilz 2015-10-15T06:19:47.000000Z 字数 482 阅读 1092

Dark Trick In Vim Advanced trick

Vim


1. Operate on a paragraph

  1. dap delete 1 para
  2. d2ap delete 2 para
  3. vap select a para

2. About the Move command

  1. nnoremap <A-j> :m .+1<CR>==
  2. nnoremap <A-k> :m .-2<CR>==
  3. inoremap <A-j> <Esc>:m .+1<CR>==gi
  4. inoremap <A-k> <Esc>:m .-2<CR>==gi
  5. vnoremap <A-j> :m '>+1<CR>gv=gv
  6. vnoremap <A-k> :m '<-2<CR>gv=gv
  7. note:
  8. 1. m(ove) .+1 ----> move to the up a line
  9. 2. == ----> align
  10. 3. gi ----> jump to the last insert mode postion
  11. 4. gv ----> jump to the last visual mode postion
  12. 5. '< ----> mark the beginning of the selection
  13. 6. '> ----> mark the end of the selection
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注