helix
helix copied to clipboard
Make "repeat last insert" respect the number prefix
With the current implementation, when you press <n>.
, the last insert is repeated only once, completely ignoring the number <n>
, unlike in vim where it's indeed inserted <n>
times.
This feature is useful for inserting repeated characters. I currently work around this issue by recording the insert as a macro, and do <n>q
instead, but this isn't very efficient.
I would like to implement this feature, but would love to get a green light from the core team first just in case the current behavior is actually intended. Thanks!
I'd say you can go ahead and open a PR for this; the current behaviour definitely isn't explicitly intended.
I've prepared quick fix for this issue. Took liberty to do that despite original author willing to do it, but I really wanted to have it fixed asap.
I don't quite get why this operation is so special that is handled differently than other commands. I probably need more context on that particular operation.
My main question here would be - is it possible to define this operation as normal operation (maybe like macro), and not as special case?
There's a separate issue for that: https://github.com/helix-editor/helix/issues/1488