From 5f7a6b8dddbbff8f948c744226f1bae1c7076db5 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 13 Dec 2022 07:11:36 -0800 Subject: [PATCH] Give some keybindings (hopefully) more descriptive names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This style of keybinding helps ‘which-key’[1] to display a better name for the command. [1]: https://github.com/justbur/emacs-which-key --- oni-core.el | 14 +++++++------- oni-gui.el | 4 ++-- oni-magit.el | 4 ++-- oni-org/oni-org.el | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/oni-core.el b/oni-core.el index 5384e45..0f55ee9 100644 --- a/oni-core.el +++ b/oni-core.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2022.1113.230412 +;; Version: 2022.1213.071035 ;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr) ;; This program is free software; you can redistribute it and/or modify @@ -209,11 +209,11 @@ _s_: String list" (global-set-key (kbd "C-S-f") 'windmove-right) (global-set-key (kbd "C-S-n") 'windmove-down) (global-set-key (kbd "C-S-p") 'windmove-up) -(global-set-key (kbd "C-c (") 'embrace-commander) -(global-set-key (kbd "C-c q") #'oni-core-unfill-paragraph) -(global-set-key (kbd "C-c s") #'oni-sort-and-align-hydra/body) +(global-set-key (kbd "C-c (") '("Embrace Commander" . embrace-commander)) +(global-set-key (kbd "C-c q") '("Unfill Paragraph" . oni-core-unfill-paragraph)) +(global-set-key (kbd "C-c s") '("Sort and Align Commands" . oni-sort-and-align-hydra/body)) (global-set-key (kbd "C-c l") 'imenu) -(global-set-key (kbd "C-x C-b") 'ibuffer-jump) +(global-set-key (kbd "C-x C-b") '("List Buffers" . ibuffer-jump)) (global-set-key (kbd "C-x M-f") 'ffap) (global-set-key (kbd "M-+") 'mc/mark-next-like-this) (global-set-key [remap insert-char] 'insert-char-preview) @@ -403,8 +403,8 @@ _s_: String list" (global-set-key [remap bookmark-jump] 'consult-bookmark) (global-set-key [remap yank-pop] 'consult-yank-pop) (global-set-key [remap goto-line] 'consult-goto-line) -(global-set-key (kbd "M-g m") 'consult-mark) -(global-set-key (kbd "M-g M") 'consult-global-mark) +(global-set-key (kbd "M-g m") '("Jump to a mark" . consult-mark)) +(global-set-key (kbd "M-g M") '("Jump to a mark anywhere" . consult-global-mark)) (global-set-key [remap imenu] 'consult-imenu) ;;; Embark diff --git a/oni-gui.el b/oni-gui.el index 3801975..f02c1ad 100644 --- a/oni-gui.el +++ b/oni-gui.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2021.1201.181902 +;; Version: 2022.1213.070242 ;; Package-Requires: (oni-ui oni-hydra yoshi-theme diminish) ;; This program is free software; you can redistribute it and/or modify @@ -124,7 +124,7 @@ _bi_: Auto Insert ^^ ^^ (oni-gui-setup-ligatures))) (global-unset-key (kbd "C-z")) -(global-set-key (kbd "C-c c") 'oni-gui-hydra/body) +(global-set-key (kbd "C-c c") '("Frequently used commands" . oni-gui-hydra/body)) (load-theme 'yoshi :no-confirm) diff --git a/oni-magit.el b/oni-magit.el index 8001404..fee0e68 100644 --- a/oni-magit.el +++ b/oni-magit.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2021.1123.003600 +;; Version: 2022.1213.070733 ;; Package-Requires: (magit magit-popup oni-hydra) ;; This program is free software; you can redistribute it and/or modify @@ -60,7 +60,7 @@ _i_: Init (setq magit-git-executable "c:/msys64/usr/bin/git.exe")) ;;;###autoload -(global-set-key (kbd "C-c v") 'oni-hydra-magit/body) +(global-set-key (kbd "C-c v") '("Magit commands" . oni-hydra-magit/body)) (provide 'oni-magit) ;;; oni-magit.el ends here diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index 7f55b34..242cc32 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2022.1112.230650 +;; Version: 2022.1213.070739 ;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti form-feed) ;; This program is free software; you can redistribute it and/or modify @@ -519,7 +519,7 @@ also move point to the start of the heading." (add-hook 'org-mode-hook #'oni-org-setup-prettify-symbols-mode)) ;;;###autoload -(global-set-key (kbd "C-c o") 'oni-hydra-org/body) +(global-set-key (kbd "C-c o") '("Org commands" . oni-hydra-org/body)) ;;;###autoload (global-set-key (kbd "C-") #'oni-org-open-index)