2022-04-15 09:50:18 +02:00
:PROPERTIES:
:ID: 22a6cb0e-5466-4edf-b0da-a8b76d879cf9
:END:
#+title : Keybindings
#+filetags : emacs-load
2022-07-31 11:03:59 +02:00
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
#
# SPDX-License-Identifier: LGPL-3.0-or-later
2022-04-15 09:50:18 +02:00
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.
2022-05-02 23:32:46 +02:00
First we need to define a new minor mode.
2022-04-15 09:50:18 +02:00
#+begin_src emacs-lisp
2022-05-02 23:32:46 +02:00
(define-minor-mode magic_rb/userbind-mode
"Minor mode for user keybindings of Magic_RB."
:lighter " userbind."
:global t
:keymap (make-sparse-keymap))
2022-04-15 09:50:18 +02:00
#+end_src
2022-05-02 23:32:46 +02:00
Then we hook our minor mode on ~meow-mode-hook~ , but only after ~meow-mode~ is loaded.
2022-04-15 09:50:18 +02:00
#+begin_src emacs-lisp
2022-05-02 23:32:46 +02:00
(add-hook 'after-init-hook 'magic_rb/userbind-mode)
2022-04-15 09:50:18 +02:00
#+end_src
#+begin_src emacs-lisp
(general-def
2022-05-02 23:32:46 +02:00
:keymaps '(magic_rb/userbind-mode-map)
:prefix "C-c"
"o f" 'org-roam-node-find
2022-05-23 08:31:53 +02:00
"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
2022-05-02 23:32:46 +02:00
"o a" 'org-agenda
2022-04-15 09:50:18 +02:00
2022-05-23 08:31:53 +02:00
2022-07-31 11:03:59 +02:00
"j f" 'consult-fd
2022-05-02 23:32:46 +02:00
"j r" 'consult-ripgrep
"j l" 'consult-line
2022-05-23 08:31:53 +02:00
"j b" 'consult-project-buffer
2022-04-15 09:50:18 +02:00
2022-05-02 23:32:46 +02:00
"p v" 'projectile-run-vterm
"p m" 'projectile-vc
"p s" 'projectile-switch-project
2022-04-15 09:50:18 +02:00
2022-07-31 11:03:59 +02:00
"r c" 'popper-cycle
"r p" 'popper-toggle-latest
"r t" 'popper-toggle-type
2022-05-02 23:32:46 +02:00
"w t" 'windmove-left
"w r" 'windmove-up
"w n" 'windmove-down
"w s" 'windmove-right
2022-07-31 11:03:59 +02:00
"w a" 'ace-window
2022-04-15 09:50:18 +02:00
2022-05-02 23:32:46 +02:00
"b i" 'indent-region
2022-06-07 17:08:31 +02:00
"b c" 'comment-dwim
2022-04-15 09:50:18 +02:00
2022-05-02 23:32:46 +02:00
"l l" 'lsp
"l r" 'lsp-workspace-restart
2022-07-31 11:03:59 +02:00
"l e" 'lsp-execute-code-action
2022-10-07 22:05:31 +02:00
"e l" 'ement-list-rooms
2022-07-31 11:03:59 +02:00
:keymaps '(special-mode-map)
:prefix ""
"q" 'nil
"k" 'quit-window)
2022-04-15 09:50:18 +02:00
#+end_src