matze / vim-move

Plugin to move lines and selections up and down
http://www.vim.org/scripts/script.php?script_id=4687
MIT License
1.2k stars 56 forks source link

Cleaning up the MoveLeft and MoveRight functions #46

Closed hugomg closed 4 years ago

hugomg commented 4 years ago

This PR continues the cleanup effort from #45.

I think everything is still working but I would appreciate if you could double check, specially the MoveBlockHorizontally. Some of those changes were not trivial and I'm not 100% sure that I was able to test all the corner cases.

matze commented 4 years ago

I think everything is still working but I would appreciate if you could double check

Looks good to me and works as expected. Do you plan to add more clean ups?

hugomg commented 4 years ago

For now the only thing I still want to do is reorder the functions so the two MoveVertically and the two MoveHorizontally functions appear next to each other. But I didn't include that commit in this PR in order to keep the diff easier to read. I could add it to this PR or to a new PR.

matze commented 4 years ago

As you prefer ;-)

hugomg commented 4 years ago

OK, I added that commit as part of this PR.

matze commented 4 years ago

Great thanks! :+1: