Skip to content

Support for repeat-map #552

@ashlineldridge

Description

@ashlineldridge

Does general.el provide any support for Emacs's repeat-map? If not, would you consider supporting it? (I understand there is a rewrite coming which may affect appetite for new features.)

general.el does have a :repeat property but AFAICT this only applies to Evil-style keybindings. I would love to be able to specify something like the following:

(general-def 'flymake-mode-map
  :prefix "M-i"
  "ld" #'flymake-show-buffer-diagnostics
  "lD" #'flymake-show-project-diagnostics
  "ln" #'flymake-goto-next-error :repeat t
  "lp" #'flymake-goto-prev-error :repeat t)

And have the :repeat property result in the flymake-goto-next-error and flymake-goto-prev-error be added to repeat-map such that the n and p keys could repeatedly invoke them.

Currently I'm using general-def (or a custom definer) to bind the keys to the regular keymap and then duplicating the repeatable keys in another keymap that I then map into repeat-map and it feels like there should be a more efficient way of doing this using general.el (if there already is a way, please point me to it).

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions