Permalink
Browse files

Accept a count with [e and ]e

  • Loading branch information...
1 parent 53fafa5 commit 50ff2310bc80f34d447a11d9924931cbb9db2ba9 @tpope committed Mar 6, 2010
Showing with 5 additions and 7 deletions.
  1. +2 −4 doc/unimpaired.txt
  2. +3 −3 plugin/unimpaired.vim
View
@@ -49,10 +49,10 @@ LINE OPERATIONS *unimpaired-lines*
]<Space> Add [count] blank lines below the cursor.
*[e* *v_[e*
-[e Exchange the current line with the one above it.
+[e Exchange the current line with [count] lines above it.
*]e* *v_]e*
-]e Exchange the current line with the one below it.
+]e Exchange the current line with [count] lines below it.
ENCODING AND DECODING *unimpaired-encoding*
@@ -94,8 +94,6 @@ Mnenomic: encoding always comes before decoding; "[" always comes before "]".
TODO *unimpaired-todo*
-Accept a count with |[e| and |]e|
-
Descend into and ascend from directories with |[o| and |]o|.
Avoid munging null characters when encoding and decoding.
View
@@ -70,10 +70,10 @@ nnoremap <silent> <Plug>unimpairedBlankDown :<C-U>put =repeat(nr2char(10),v:coun
nmap [<Space> <Plug>unimpairedBlankUp
nmap ]<Space> <Plug>unimpairedBlankDown
-nnoremap <silent> <Plug>unimpairedMoveUp m`:move--<CR>``
+nnoremap <silent> <Plug>unimpairedMoveUp :<C-U>exe 'norm m`'<Bar>exe 'move--'.v:count1<CR>``
nnoremap <silent> <Plug>unimpairedMoveDown :<C-U>exe 'norm m`'<Bar>exe 'move+'.v:count1<CR>``
-xnoremap <silent> <Plug>unimpairedMoveUp m`:move--<CR>``
-xnoremap <silent> <Plug>unimpairedMoveDown m`:move'>+<CR>``
+xnoremap <silent> <Plug>unimpairedMoveUp :<C-U>exe 'norm m`'<Bar>exe '''<,''>move--'.v:count1<CR>``
+xnoremap <silent> <Plug>unimpairedMoveDown :<C-U>exe 'norm m`'<Bar>exe '''<,''>move''>+'.v:count1<CR>``
nmap [e <Plug>unimpairedMoveUp
nmap ]e <Plug>unimpairedMoveDown

0 comments on commit 50ff231

Please sign in to comment.