From a92e0fc9b1fbe1d8f0321ac0d5634460a05b15da Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 26 Oct 2025 01:33:36 -0500 Subject: feat:custom-line-paragraph: add keybinding for duplicate-and-comment - Add C-; l c keybinding to duplicate line/region with commenting - Add which-key description "duplicate and comment" for the new binding - Complements existing C-; l d (duplicate without comment) --- modules/custom-line-paragraph.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/custom-line-paragraph.el b/modules/custom-line-paragraph.el index f33d6b55..e66b024d 100644 --- a/modules/custom-line-paragraph.el +++ b/modules/custom-line-paragraph.el @@ -13,7 +13,7 @@ ;; - removing lines containing specific text ;; - underlining text with a custom character ;; -;; Bound to keymap prefix ~C-; l +;; Bound to keymap prefix C-; l ;; ;;; Code: @@ -130,13 +130,15 @@ If the line is empty or contains only whitespace, abort with a message." "j" #'cj/join-line-or-region "J" #'cj/join-paragraph "d" #'cj/duplicate-line-or-region + "c" (lambda () (interactive) (cj/duplicate-line-or-region t)) "R" #'cj/remove-duplicate-lines-region-or-buffer "r" #'cj/remove-lines-containing "u" #'cj/underscore-line) (keymap-set cj/custom-keymap "l" cj/line-and-paragraph-map) (with-eval-after-load 'which-key - (which-key-add-key-based-replacements "C-; l" "line and paragraph menu")) + (which-key-add-key-based-replacements "C-; l" "line and paragraph menu") + (which-key-add-key-based-replacements "C-; l c" "duplicate and comment")) (provide 'custom-line-paragraph) ;;; custom-line-paragraph.el ends here. -- cgit v1.2.3