diff options
| author | Craig Jennings <c@cjennings.net> | 2025-10-26 01:33:36 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-10-26 01:33:36 -0500 |
| commit | a92e0fc9b1fbe1d8f0321ac0d5634460a05b15da (patch) | |
| tree | 47f4552ffc31c8e9b0bd74edda7355ede35cd079 /modules | |
| parent | 8ac6e5c7c6f9d8bc2336d9e3e3bd2f95875a4cce (diff) | |
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)
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/custom-line-paragraph.el | 6 |
1 files changed, 4 insertions, 2 deletions
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. |
