mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 17:46:14 +01:00
79 lines
1.9 KiB
Org Mode
79 lines
1.9 KiB
Org Mode
|
:PROPERTIES:
|
||
|
:ID: 22a6cb0e-5466-4edf-b0da-a8b76d879cf9
|
||
|
:END:
|
||
|
#+title: Keybindings
|
||
|
#+filetags: emacs-load
|
||
|
|
||
|
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||
|
#
|
||
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||
|
|
||
|
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.
|
||
|
|
||
|
#+begin_src emacs-lisp
|
||
|
(define-minor-mode magic_rb/userbind-mode
|
||
|
"Minor mode for user keybindings of Magic_RB."
|
||
|
:lighter " userbind."
|
||
|
:global t
|
||
|
:keymap (make-sparse-keymap))
|
||
|
#+end_src
|
||
|
|
||
|
Then we hook our minor mode on ~meow-mode-hook~, but only after ~meow-mode~ is loaded.
|
||
|
|
||
|
#+begin_src emacs-lisp
|
||
|
(add-hook 'after-init-hook 'magic_rb/userbind-mode)
|
||
|
#+end_src
|
||
|
|
||
|
#+begin_src emacs-lisp
|
||
|
(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
|
||
|
"e v" 'ement-view-room
|
||
|
|
||
|
"M-c" 'tempel-insert
|
||
|
:keymaps '(special-mode-map)
|
||
|
:prefix ""
|
||
|
"q" 'nil
|
||
|
"k" 'quit-window)
|
||
|
#+end_src
|