From 68d291892fde139452df169c01ce52c73cedc0d0 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:38:19 -0400 Subject: [PATCH] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 11e1789..eecceff 100644 --- a/README.md +++ b/README.md @@ -415,14 +415,15 @@ The `evil-surround` package simplifies handling surrounding characters, such as :hook (after-init . global-evil-surround-mode)) ``` -You can also add the following code to enable commenting and uncommenting by pressing `gcc` in normal mode and `gc` in visual mode (Special thanks to Reddit user u/mistakenuser for this contribution, which replaces the evil-commentary package): +You can also add the following code to enable commenting and uncommenting by pressing `gcc` in normal mode and `gc` in visual mode (thanks you to the Reddit user u/mistakenuser for this contribution, which replaces the evil-commentary package): ``` emacs-lisp (with-eval-after-load "evil" - (evil-define-operator my-evil-comment (beg end) + (setq comment-empty-lines t) + (evil-define-operator my-evil-comment-or-uncomment (beg end) "Toggle comment from BEG to END." (interactive "") (comment-or-uncomment-region beg end)) - (evil-define-key 'normal 'global (kbd "gc") 'my-evil-comment)) + (evil-define-key 'normal 'global (kbd "gc") 'my-evil-comment-or-uncomment)) ``` ### How to configure straight.el?