More repeatable actions to navigate, move, delete more targets?
Now that embark supports multiple targets and repeatable actions, it might be interesting to standardize on some more repeatable commands for more targets.
Let's take sentences. n and p move point forward and backward by sentences, that's great. t does transpose which in this case will move the current sentence forward and it's repeatable. If you give it an argument of -1 it will move the sentence backwards but that's not easily repeatable, you have to give the argument each time (or count ahead of time and use an argument like-4). Maybe a repeated command should auto-repeat the argument too?
What if we defined commands move-sentence-backwards and move-sentence-forwards and put them on M-p and M-n (or say P and N). What if n, p, M-n, M-p worked similarly for words and paragraphs? And in programming languages for symbols, sexps, lines, defuns, etc. Maybe a delete command could be repeatable too, so that after deleting a target, the next target is highlighted ready to be deleted as well.
I'm not sure about this and maybe it should be an additional package, but I wanted to throw the idea out there for comments. It seems to me this could be a poor man's objed mode.
Some small comments on the current situation:
-
To make
M-- tslightly easier to type I bound-tonegative-argument, sotdrags forward and- tbackward. Binding a transpose command in more cases is definitely reasonable (I think we just have senetences, sexps and paragraphs now). I did also think about definingembark-tranpose-THING-backwardscommands, so you don't need the negative prefix, but for now just did the-thing. -
A delete command can easily de made repeatable by adding it to
embark-repeat-actions. You can even have both repeatable and non-repeatable deletion commands by usingdefaliasand making only one of them repeatable.
I do like your proposal, but I'm not sure how much of it we should have in the default configuration.
- so
tdrags forward and- tbackward.
That's great. I wish this was more discoverable from a help screen. And this should be mentioned in the README.
And it's not just - for negative-argument, I also bound all the numbers to digit-argument. I should definitely mention that in the README. (Updating the documentation is now the only reason I haven't tagged a 0.12 release; I'm just swamped at work right now, but the documentation update will happen soonish.)