Skip to content

Commit

Permalink
Accept a count with [e and ]e
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Mar 6, 2010
1 parent 53fafa5 commit 50ff231
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions doc/unimpaired.txt
Expand Up @@ -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*

Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions plugin/unimpaired.vim
Expand Up @@ -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
Expand Down

0 comments on commit 50ff231

Please sign in to comment.