home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit a116812d2d91af4cf553a3bcfd99753e14c627ef
parent 68a6c92030f9dbfca972e1c64c4f0e09059e9ac1
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri,  1 May 2020 12:32:11 +0200

config-editing.el: whitespace-mode changes

- disabled by default
- f6 to toggle it

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mtools/emacs/config/config-editing.el | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tools/emacs/config/config-editing.el b/tools/emacs/config/config-editing.el @@ -50,9 +50,16 @@ ;; UseWhitespace (use-package whitespace - :hook ((prog-mode . whitespace-mode)) + :commands (whitespace-mode sbr/toggle-invisibles) :config - (setq-default whitespace-style '(face tabs spaces trailing space-before-tab newline indentation empty space-after-tab space-mark tab-mark newline-mark))) + (setq-default whitespace-style '(face tabs spaces trailing space-before-tab newline indentation empty space-after-tab space-mark tab-mark newline-mark)) + (defun sbr/toggle-invisibles () + "Toggles the display of indentation and space characters." + (interactive) + (if (bound-and-true-p whitespace-mode) + (whitespace-mode -1) + (whitespace-mode))) + :bind ("<f6>" . sbr/toggle-invisibles)) ;; -UseWhitespace ;; UseExpandRegion @@ -205,7 +212,7 @@ instead. This command can then be followed by the standard ("<C-S-return>" . prot/new-line-above) ("M-SPC" . cycle-spacing) ("M-o" . delete-blank-lines) - ("<f6>" . tear-off-window) + ("<C-f6>" . tear-off-window) ("C-S-y" . prot/yank-replace-line-or-region))) (use-package crux