Does a simple 'repeat last command' (for _any_ command) feature exist? #8311
Replies: 11 comments 4 replies
-
Digging a little further... https://github.com/helix-editor/helix/blob/master/book/src/keymap.md has a A little code searching (in session below) reveals a If someone can spell out where the "repeat last insertion/change" stuff is happening, I might be able to look further, maybe even generate an "add repeat last delete/deletion" PR for
|
Beta Was this translation helpful? Give feedback.
-
Related issue/discussion here (for us historically- |
Beta Was this translation helpful? Give feedback.
-
I'd also be happy to map an additional/separate (from So again, I'm wondering: how does |
Beta Was this translation helpful? Give feedback.
-
Repeat is handled here: https://github.com/helix-editor/helix/blob/master/helix-term/src/ui/editor.rs#L895-L929 it would probably be nice if it was moved to a command I wonder how you would see a repeat last delete implemented/what it would do because the delete command just deletes whatever the current selection is which doesn't translate well to being repeated because how do you recreate a selection that was deleted? |
Beta Was this translation helpful? Give feedback.
-
Very helpful, many thanks @gabydd.
The goal is to make a new selection, repeating the last "command + selection" (or "selection + command"?) that was made. Just like vim does. Seems feasible to me. Maybe I'm missing something. Or maybe I misinterpreted what you're writing above? eg: issuing Of course, I might be mixing |
Beta Was this translation helpful? Give feedback.
-
I simply want to repeat the last command (or command "set"). It's this simple: run a normal-mode command and then repeat said command... REGARDLESS of the Maybe it would help if some ex- The (kind of long and complex) paragraph below feels... far from simple. :-/ It's a bit hard for me to follow. However, I want to give a BIG THANK YOU for helping me with this @gabydd. 🤓
|
Beta Was this translation helpful? Give feedback.
-
I can also see how the normal-and-visual- But...
|
Beta Was this translation helpful? Give feedback.
-
(I edited the title of this discussion to reflect the broader scope.) |
Beta Was this translation helpful? Give feedback.
-
All of this seems like a macro. In vim repeat makes more sense because selection and action are coupled (dw is one command) but in helix it's not so it's unclear how many commands should ne recorded/repeated. We already have macros that record a certain key sequences and then you can repeat them. I don't think we would add anything beyond that. In general helix is based around multi cursors so instead of repeating something often you would select everything you would want to delete at once only press |
Beta Was this translation helpful? Give feedback.
-
Question: Is it possible (for me or others) to add a "repeat last deletion" (in say There seems to be "repeat last movement" and "repeat last insert/change" functionality. replies to and questions surrounding @pascalkuthe's above points:
Ah. This seems like the core of the challenge. Got it.
Right. If I understand this correctly, that means making a diff macro for each command sequence. That's in some ways helpful, thanks. However, it's not a general, single "repeat last command" manuever/command/keystroke that I can reuse in many cases, if I understand things correctly...?
Yep, that makes sense, and this user-interaction "philosophy" seems clear, and seems like a reasonable alternative to my old I'd still like to see if a "repeat last deletion" mechanism is possible--per my first question, above. |
Beta Was this translation helpful? Give feedback.
-
I too find it frustrating to not be able to repeat the last delete of a line or word. I often use These is one of the main issues that has prevented me from moving from nvim to helix. |
Beta Was this translation helpful? Give feedback.
-
Is there a
repeat last deletion
command/feature? If not, why not?I see lots of "repeat last" conversations (below), but have yet to see a specific
repeat last deletion
discussion/reference.https://github.com/search?q=repo%3Ahelix-editor%2Fhelix+repeat+last&type=issues
https://github.com/search?q=repo%3Ahelix-editor%2Fhelix+repeat+last&type=discussions
Beta Was this translation helpful? Give feedback.
All reactions