diff options
Diffstat (limited to 'modules/keybindings.el')
| -rw-r--r-- | modules/keybindings.el | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/modules/keybindings.el b/modules/keybindings.el index 3d817013..d7af0bb2 100644 --- a/modules/keybindings.el +++ b/modules/keybindings.el @@ -3,8 +3,6 @@ ;;; Commentary: - - ;; Commonly used files should be easy to jump to. The "jump-to" keymap has the ;; "C-c j" prefix and immediately opens files defined in user-constants.el. @@ -24,6 +22,28 @@ ;; remap Shift Backspace to Delete (global-set-key (kbd "S-<backspace>") 'delete-forward-char) +;; ------------------------------- Custom Keymap ------------------------------- + +(defvar cj/custom-keymap + (let ((map (make-sparse-keymap))) + map) + "The base key map for custom elisp functions holding miscellaneous functions. +Other key maps extend from this key map to hold categorized functions.") + +;; Set the global binding +(global-set-key (kbd "C-;") cj/custom-keymap) + +;; Override flyspell's binding when it loads +(with-eval-after-load 'flyspell + (define-key flyspell-mode-map (kbd "C-;") nil)) + +;; Unnecessary, but leaving here for reference. +;; Optional: Ensure it stays unbound even if flyspell redefines it +;; (add-hook 'flyspell-mode-hook +;; (lambda () +;; (define-key flyspell-mode-map (kbd "C-;") nil))) + + ;; ------------------------------ Jump To Commands ----------------------------- ;; quick access for commonly used files @@ -50,7 +70,6 @@ (define-key jump-to-keymap (kbd "I") #'(lambda () (interactive) (find-file emacs-init-file))) - ;; ---------------------------- Keybinding Discovery --------------------------- (use-package free-keys @@ -95,6 +114,5 @@ (message (concat "Seriously, " user-name "? Use 'C-/'. It's faster.")))) - (provide 'keybindings) ;;; keybindings.el ends here |
