summaryrefslogtreecommitdiff
path: root/modules/vc-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-25 19:56:40 -0500
committerCraig Jennings <c@cjennings.net>2025-10-25 19:56:40 -0500
commit746cefd4d674bfc6dd9fdfe4aeb79c7e760ec268 (patch)
tree8bb53c9300298028390dec51f8cc46ada5689b2e /modules/vc-config.el
parentd69f41af1f6e0d1bea8a2942f5e99b6ef961c1ef (diff)
refactor:keymaps: Replace define-prefix-command with defvar-keymap
Refactor the keymap definitions across multiple modules by replacing `define-prefix-command` with `defvar-keymap`. This simplifies the keymap setup and integrates better with the `which-key` package for enhanced documentation and usability. Updated modules include custom-ordering, custom-text-enclose, custom-whitespace, mail-config, music-config, org-drill-config, test-runner, and vc-config.
Diffstat (limited to 'modules/vc-config.el')
-rw-r--r--modules/vc-config.el25
1 files changed, 14 insertions, 11 deletions
diff --git a/modules/vc-config.el b/modules/vc-config.el
index 56ba1944..3b116cc1 100644
--- a/modules/vc-config.el
+++ b/modules/vc-config.el
@@ -118,17 +118,20 @@
;; --------------------------------- VC Keymap ---------------------------------
;; Ordering & sorting prefix and keymap
-(define-prefix-command 'cj/vc-map nil
- "Keymap for version control operations.")
-(keymap-set cj/custom-keymap "v" #'cj/vc-map)
-(keymap-set cj/vc-map "d" #'cj/goto-git-gutter-diff-hunks)
-(keymap-set cj/vc-map "c" #'cj/forge-create-issue)
-(keymap-set cj/vc-map "f" #'forge-pull)
-(keymap-set cj/vc-map "i" #'forge-list-issues)
-(keymap-set cj/vc-map "n" #'git-gutter:next-hunk)
-(keymap-set cj/vc-map "p" #'git-gutter:previous-hunk)
-(keymap-set cj/vc-map "r" #'forge-list-pullreqs)
-(keymap-set cj/vc-map "t" #'cj/git-timemachine)
+(defvar-keymap cj/vc-map
+ :doc "Keymap for version control operations"
+ "d" #'cj/goto-git-gutter-diff-hunks
+ "c" #'cj/forge-create-issue
+ "f" #'forge-pull
+ "i" #'forge-list-issues
+ "n" #'git-gutter:next-hunk
+ "p" #'git-gutter:previous-hunk
+ "r" #'forge-list-pullreqs
+ "t" #'cj/git-timemachine)
+
+(keymap-set cj/custom-keymap "v" cj/vc-map)
+(with-eval-after-load 'which-key
+ (which-key-add-key-based-replacements "C-; v" "version control menu"))
(provide 'vc-config)
;;; vc-config.el ends here.