Skip to content

Add custom keybindings #98

Answered by abougouffa
ArchGalileu asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ArchGalileu

For custom keybindings, there are two types: global or local (mode-specific) keybindings.

For the global ones, you can simply add the +map! block to your config.el. If you want to overwrite the default bindings, it is preferred to wrap the +map! block in an (with-eval-after-load 'me-general-ready (+map! "a" #'some-command)).

For the local keybindings (set with +map-local!), you can do it after loading the concerned package. Something like:

(with-eval-after-load 'org ;; After loading the org package
  ;; Set the local keybindings
  (+map-local! :keymaps 'org-mode-map
    "xx" #'some-command
    "xy" #'another-command))

Thanks for the compliment, happy to hear that you've…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ArchGalileu
Comment options

Answer selected by ArchGalileu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants