Set comment-empty-lines to t
This commit is contained in:
@@ -418,7 +418,6 @@ The `evil-surround` package simplifies handling surrounding characters, such as
|
|||||||
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):
|
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
|
``` emacs-lisp
|
||||||
(with-eval-after-load "evil"
|
(with-eval-after-load "evil"
|
||||||
(setq comment-empty-lines t)
|
|
||||||
(evil-define-operator my-evil-comment-or-uncomment (beg end)
|
(evil-define-operator my-evil-comment-or-uncomment (beg end)
|
||||||
"Toggle comment from BEG to END."
|
"Toggle comment from BEG to END."
|
||||||
(interactive "<r>")
|
(interactive "<r>")
|
||||||
|
|||||||
6
init.el
6
init.el
@@ -292,6 +292,12 @@
|
|||||||
;; Remove duplicates from the kill ring to reduce clutter
|
;; Remove duplicates from the kill ring to reduce clutter
|
||||||
(setq kill-do-not-save-duplicates t)
|
(setq kill-do-not-save-duplicates t)
|
||||||
|
|
||||||
|
;; Ensures that empty lines within the commented region are also commented out.
|
||||||
|
;; This prevents unintended visual gaps and maintains a consistent appearance,
|
||||||
|
;; ensuring that comments apply uniformly to all lines, including those that are
|
||||||
|
;; otherwise empty.
|
||||||
|
(setq comment-empty-lines t)
|
||||||
|
|
||||||
;;; Load post-init.el
|
;;; Load post-init.el
|
||||||
(minimal-emacs-load-user-init "post-init.el")
|
(minimal-emacs-load-user-init "post-init.el")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user