-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Replace move-text with drag-stuff #14449
Replace move-text with drag-stuff #14449
Conversation
Just like: https://github.com/emacsfodder/move-text https://github.com/rejeep/drag-stuff.el also drags one or more (region) lines up or down. But it also allows for dragging left and right (across end of lines): - a word: changing place with the next or previous word. - a region: moving it one character at a time to the left or right. Added a new key binding: `SPC x .` that opens the: ``` Drag Stuff Transient State [k/K] up [h/H] left [q] quit [j/J] down [l/L] right ``` The `move-text` package isn't removed, even though it isn't used anymore in Spacemacs. Because the `evil-unimpaired` elpa directory is generated from the local Spacemacs `evil-unimpaired.el` file. https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bspacemacs/spacemacs-evil/local/evil-unimpaired/evil-unimpaired.el Therefore the `evil-unimpaired` key bindings `[e` and `]e` still call the `move-text` commands. Until the `evil-unimpaired` elpa directory has been removed and regenerated by restarting Spacemacs. Then they will call the new `drag-stuff` commands. I don't know if/when the `move-text` package can be removed in the future.
A question not directly related: For example suppose I have the following in a buffer: (foo arg1 arg2
(bar arg3
(if arg4
(baz)
(xyz)))) And I have the (foo arg1 arg2
(if arg4
(baz)
(xyz))
(bar arg3)) If invoked again, to (if arg4
(baz)
(xyz))
(foo arg1 arg2
(bar arg3)) |
Before:
With the if block selected:
I haven't tried the it, but this package came up: It has commands called: They might be able to move the if block correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good will be merged soon.
I'm not sure how I thought that the But I see now that it's elpa directory:
Now |
Just like: https://github.com/emacsfodder/move-text
https://github.com/rejeep/drag-stuff.el
also drags one or more (region) lines up or down.
But it also allows for dragging left and right (across end of lines):
Added a new key binding:
SPC x .
that opens the:
The
move-text
package isn't removed, even though it isn't used anymore inSpacemacs.
Because the
evil-unimpaired
elpa directory is generated from the localSpacemacs
evil-unimpaired.el
file.https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bspacemacs/spacemacs-evil/local/evil-unimpaired/evil-unimpaired.el
Therefore the
evil-unimpaired
key bindings[e
and]e
still call themove-text
commands.Until the
evil-unimpaired
elpa directory has been removed and regenerated byrestarting Spacemacs.
Then they will call the new
drag-stuff
commands.I don't know if/when the
move-text
package can be removed in the future.