Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap lines command #289

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

dgosbell
Copy link

Feature

Swap the lines of selection with the adjucent one. (based off the work done in #90)
This now correctly maintains the current selection and caret position and it has been tested with undo/redo

This is same as Alt+Up/Down in Visual Studio, Ctrl+Shift+Up/Down in Sublime Text, etc.

Sample

zzzz
xx<caret/>xx
wwww

     ↓ Alt+Up ↓

xx<caret/>xx
zzzz
wwww

And with selection.

zzzz
xxx<selection>yyy
yyyy</selection>xxxx
wwww

     ↓ Alt+Up ↓

xxx<selection>yyy
yyyy</selection>xxxx
zzzz
wwww

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants