Swap lines command #289

Open
dgosbell wants to merge 8 commits from dgosbell/swap_lines_command into master
dgosbell commented 2021-06-25 04:03:33 -05:00 (Migrated from github.com)

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
## 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 ```
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'dgosbell/swap_lines_command:dgosbell/swap_lines_command'
git switch 'dgosbell/swap_lines_command'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'master'
git merge --no-ff 'dgosbell/swap_lines_command'
git switch 'dgosbell/swap_lines_command'
git rebase 'master'
git switch 'master'
git merge --ff-only 'dgosbell/swap_lines_command'
git switch 'dgosbell/swap_lines_command'
git rebase 'master'
git switch 'master'
git merge --no-ff 'dgosbell/swap_lines_command'
git switch 'master'
git merge --squash 'dgosbell/swap_lines_command'
git switch 'master'
git merge --ff-only 'dgosbell/swap_lines_command'
git switch 'master'
git merge 'dgosbell/swap_lines_command'
git push origin 'master'
Sign in to join this conversation.
No description provided.