From f52436da06a172a7164f67a6a026b1b207f6dca9 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 24 Nov 2022 20:38:15 +0000 Subject: a function now to clear the checkbox --- init.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index 551ff0e..88aa226 100644 --- a/init.el +++ b/init.el @@ -227,10 +227,20 @@ Restart works only on graphic display." ;; PACKAGES ;; markdown mode + +(defun mrl/clear-check-single-line () + (interactive) + (save-excursion + (beginning-of-line) + (forward-char 3) + (delete-char 1) + (insert-char ?\s)) + (next-line)) + (use-package markdown-mode :ensure t :bind (:map markdown-mode-map - ("C-c C-v" . mrl/markdown-clear-checkbox)) + ("C-c C-v" . mrl/clear-check-single-line)) :hook (markdown-mode-hook . (lambda () (when buffer-file-name (add-hook 'after-save-hook -- cgit v1.2.3