Skip to content
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

Allow user remapping of "repeat last insert" #1488

Open
eugenesvk opened this issue Jan 12, 2022 · 4 comments
Open

Allow user remapping of "repeat last insert" #1488

eugenesvk opened this issue Jan 12, 2022 · 4 comments
Labels
A-keymap Area: Keymap and keybindings C-enhancement Category: Improvements

Comments

@eugenesvk
Copy link

As far as I understand, there is no "repeat last command" command, you must use the default . keybind

I'd like to move this command to a different key, so I'd need a repeat_last_command command I could use

@eugenesvk eugenesvk added the C-enhancement Category: Improvements label Jan 12, 2022
@kirawi kirawi added the A-keymap Area: Keymap and keybindings label Jan 12, 2022
@archseer
Copy link
Member

For historical reasons this is currently a builtin

// special handling for repeat operator
key!('.') if self.keymaps.pending().is_empty() => {
// first execute whatever put us into insert mode
self.last_insert.0.execute(cxt);
// then replay the inputs
for &key in &self.last_insert.1.clone() {
self.insert_mode(cxt, key)
}
}

but since macros don't have this limitation and also do a similar thing I think it should be possible to refactor this into a command now 👍🏻

@the-mikedavis the-mikedavis changed the title Allow user remapping of "repeat last command" Allow user remapping of "repeat last insert" Aug 9, 2022
@rcorre
Copy link
Contributor

rcorre commented Feb 15, 2023

A side-effect of this is that you can't map anything else to .

@stindrago

This comment was marked as spam.

moparisthebest added a commit to moparisthebest/helix that referenced this issue Sep 28, 2023
moparisthebest added a commit to moparisthebest/helix that referenced this issue Oct 3, 2023
moparisthebest added a commit to moparisthebest/helix that referenced this issue Oct 10, 2023
moparisthebest added a commit to moparisthebest/helix that referenced this issue Mar 26, 2024
moparisthebest added a commit to moparisthebest/helix that referenced this issue Apr 1, 2024
moparisthebest added a commit to moparisthebest/helix that referenced this issue Aug 23, 2024
@NikitaRevenco
Copy link
Contributor

It looks like to easily implement this we also need #5555 to be resolved, see this comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-keymap Area: Keymap and keybindings C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

6 participants