I am trying to do a mapping that moves the current line to another line. Something like
nnoremap < space >m$VARIABLE :m $VARIABLE <CR> dd
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Start with the basics, typing:
Would move the CURRENT line ('.') to line 15.
Other than possibly creating a user-command which would accept a leading number indicating WHERE you want the current line to be moved, nothing comes to mind, nothing SIMPLE comes to mind. (Rube Goldberg comes to mind...)
command! -nargs=0 MyMove :.m<count> nnoremap! mv :MyMove
MIGHT work, my vim-fu is not strong yet. You didn't supply much information, but that's close I suppose.