vim-move icon indicating copy to clipboard operation
vim-move copied to clipboard

[Feature Request] Moving blocks based on previous content

Open D1mon opened this issue 6 years ago • 1 comments
trafficstars

select all 2 and move up:

1 1 1 1
1 1 1 1
1 1 1 1
        2 2 2 2
        2 2 2 2
        2 2 2 2

it should end up like this:

1 1 1 1 2 2 2 2
1 1 1 1 2 2 2 2
1 1 1 1 2 2 2 2

D1mon avatar Mar 05 '19 13:03 D1mon

What should this do if there are non-whitespace characters in the region that we are moving into? For example, if we start with the following text and move the block ot 2's up by 2 lines what should be the result?

1 1 1 1 a a a a
1 1 1 1 b b b b
1 1 1 1 c c c c
        2 2 2 2
        2 2 2 2
        2 2 2 2

Should it be moved over the old text, leaving whitespace behind?

1 1 1 1 a a a a
1 1 1 1 2 2 2 2
1 1 1 1 2 2 2 2
        2 2 2 2    

Or should the old text be moved down, similarly to what is currently done when a block is moved horizontally?

1 1 1 1 a a a a
1 1 1 1 2 2 2 2
1 1 1 1 2 2 2 2
        2 2 2 2
        b b b b
        c c c c

hugomg avatar Jul 07 '20 20:07 hugomg