-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Repeating actions #244
Comments
Aren't there very few actions one would want to repeat? But yes, going back to transient maps would probably make this easy. |
Yes, I am not entirely sure about this. There are probably not many actions, you can take a look at cmap for other examples. Nevertheless I wanted to put it up for discussion. |
I'm a big fan of the package If embark could generalize these for any target it would be great. I think you'd want different maps for different target types. symbols or variables you'd want to treat individually like symbol-overlay (go to the next occurrence of this symbol) but for URLs or bug-references (or I guess file names in a buffer) I think you'd want to just go to the next URL. I'm not much of an org user but I'd think various org targets would behave as URLs (eg go to the next timestamp). URLs wouldn't want a replace command but browse-url or open in eww would be nice. So: |
I would have said that the main feature of symbol-overlay is actually the keymap, since highlighting stuff in different colors is something that the built-in As for these "move to next thing" commands, they sound like a pretty good idea, specially if they are repeatable, but maybe even without that. |
Implemented in #245 |
So, are there any other actions in Embark's default configuration we should mark as repeatable? |
Some of the region commands could be repeatable, e.g., rot13 ;) |
Seriously when acting on regions or symbols I often like cycling variants, e.g. cycle filling, cycle capitalization, cycle identifier styles (string-inflection package). Then spelling mistakes, the flyspell correct command also cycles at point. One can probably reuse the ispell command to get the same behavior. |
Ooh, the string-inflection example sounds like a good one for the wiki. It probably involves just binding one command and adding it to the repeatable list, right? |
Yes, this is how I am going to use string-inflection now. Doesn't require an individual toplevel keybinding anymore. Needs some testing though, the target finder may not find the full identifier at point when you cycle through the styles. But I don't think this matters since the command does not read a string but uses the identifier at point. Only the highlighting may be messed up. |
This is a good idea from cmap - it allows repeating actions by pressing the action key multiple times. This is similar to Emacs 28
repeat-mode
.For example cmap has commands
cmap-symbol-next/previous
. Furthermore it is potentially useful for org commands at point which can be repeated, e.g.,org-timestamp-up
.These commands could be repeated by pressing
C-. n n n
.I assume that support for this will be easy to implement when Embark uses transient keymaps, since then one could just keep the action keymap alive.
The text was updated successfully, but these errors were encountered: