On 2015-10-07 10:43, Paul wrote: > On Wednesday, 07 October, 2015 at 10:34:06 BST, Paul wrote: > >Is it possible to move a line or lines, with :m, and not have the > >cursor jump to that new location, ie. to have it stay where it is? > > Sorry - the same question for :[range]d.
Short answer: no. Because you're moving the line(s), even if you dropped a mark at the start/middle/end of your range and moved the range, the mark moves with the range. So the best you could do would be to drop a mark at a line before/after your range, do the :move, then jump back to the mark you dropped. I've used the existing behavior demonstrated by the ":copy" command which I used recently in this thread http://vim.1045645.n5.nabble.com/Execute-command-on-multiple-ranges-found-by-regex-td5725076.html and occasionally wanted the alternate behavior. In an ideal world (for me), at a minimum the ":move" and ":copy"/":t" commands would add an entry in the jump-list so that after the move/copy moves your cursor, at least a ctrl+o will move you back to where you were previously. Alas, no such joy. -tim -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
