2

Instead of pressing backspace multiple times to move lines up one, is there a vim shortcut/command that can do this?

I know you can move a single line up or down with :m - or +, so I figure it there should be a command for this aswell but can't find the documentation for it.

Just figured out you can press dd on the blank line to move everything up.

closed as unclear what you're asking by Rich, Martin Tournoij Jan 19 '16 at 13:10

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    To move all the lines, from the current one down to the last one, one line upward, you could also use a range: :.,$m-2 – saginaw Dec 24 '15 at 22:50
  • 3
    also, kddGp should do the same thing as :.,$m-2... – Amadan Dec 25 '15 at 1:15
  • 2
    I'm confused; do you want to move a set of lines to a specific place in the document, preserving existing lines by shifting or swapping them? Or do you want to move lines and delete intervening or replacing lines? Can you provide a concrete example of your task? – Josh Jan 15 '16 at 16:50

Browse other questions tagged or ask your own question.