dotfiles/emacs-lisp/keybindings.org
main 2bdc9cb22f
Pantalaimon and ement.el
Signed-off-by: main <magic_rb@redalder.org>
2022-10-07 22:05:31 +02:00

1.9 KiB

Keybindings

#

This file contains all keybindings of my Emacs configuration. I chose to put them all into one file for easy reference and also cross package consistency is easier to ensure when you have everything on one screen.

First we need to define a new minor mode.

  (define-minor-mode magic_rb/userbind-mode
    "Minor mode for user keybindings of Magic_RB."
    :lighter " userbind."
    :global t
    :keymap (make-sparse-keymap))

Then we hook our minor mode on meow-mode-hook, but only after meow-mode is loaded.

   (add-hook 'after-init-hook 'magic_rb/userbind-mode)
  (general-def
    :keymaps '(magic_rb/userbind-mode-map)
    :prefix "C-c"
    "o f" 'org-roam-node-find
    "o i" 'org-roam-node-insert
    "o t" 'org-roam-tag-add
    "o T" 'org-roam-tag-remove
    "o r" 'org-roam-ref-add
    "o R" 'org-roam-ref-remove
    "o c" 'org-roam-capture
    "o b" 'org-roam-buffer-toggle
    "o a" 'org-agenda


    "j f" 'consult-fd
    "j r" 'consult-ripgrep
    "j l" 'consult-line
    "j b" 'consult-project-buffer

    "p v" 'projectile-run-vterm
    "p m" 'projectile-vc
    "p s" 'projectile-switch-project

    "r c" 'popper-cycle
    "r p" 'popper-toggle-latest
    "r t" 'popper-toggle-type

    "w t" 'windmove-left
    "w r" 'windmove-up
    "w n" 'windmove-down
    "w s" 'windmove-right
    "w a" 'ace-window

    "b i" 'indent-region
    "b c" 'comment-dwim

    "l l" 'lsp
    "l r" 'lsp-workspace-restart
    "l e" 'lsp-execute-code-action

    "e l" 'ement-list-rooms
    :keymaps '(special-mode-map)
    :prefix ""
    "q" 'nil
    "k" 'quit-window)