diff --git a/plugin/move.vim b/plugin/move.vim index 60cf83e..1809e2e 100644 --- a/plugin/move.vim +++ b/plugin/move.vim @@ -17,6 +17,8 @@ if !exists('g:move_map_keys') endif function! s:ResetCursor() + normal! gv + normal! = normal! gv normal! ^ endfunction @@ -62,10 +64,12 @@ function! s:MoveLineUp() range if (line('.') - distance) < 0 execute 'm 0' + normal! == return endif execute 'm-' . distance + normal! == endfunction function! s:MoveLineDown() range @@ -79,10 +83,12 @@ function! s:MoveLineDown() range if (line('.') + distance) > line('$') execute 'm $' + normal! == return endif execute 'm+' . distance + normal! == endfunction vnoremap MoveBlockDown :call MoveBlockDown()