From 710fd24d7b594ea4707121235e771b08fb69b6d7 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 25 Jun 2020 14:01:21 -0400 Subject: [PATCH] Set up ws-butler-mode --- emacs/init.org | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index cbe2517..68a5a05 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -180,15 +180,6 @@ Better keybinding. replace))) #+END_SRC -Delete trailing whitespace on save: -#+BEGIN_SRC emacs-lisp - (defvar *should-delete-trailing-whitespace* t) - (defun delete-trailing-whitespace-hook-fn () - (when *should-delete-trailing-whitespace* - (delete-trailing-whitespace))) - (add-hook 'before-save-hook #'delete-trailing-whitespace-hook-fn) -#+END_SRC - * Autocompletion There seems to be [[https://github.com/company-mode/company-mode/issues/68][some contention]] about whether autocomplete or company are better autocomplete packages. I'm going with company for now because the maintainer seems nicer... #+BEGIN_SRC emacs-lisp @@ -1277,6 +1268,15 @@ Speedbar is cool but having it open in a separate frame is annoying. This makes (leader-def-key "S" #'switch-to-speedbar) #+END_SRC +* Trailing whitespace +[[https://github.com/lewang/ws-butler][ws-butler]] deletes trailing whitespace on lines that you touch, but +leaves other lines alone: +#+BEGIN_SRC emacs-lisp + (use-package ws-butler + :straight (ws-butler :host github :repo "lewang/ws-butler") + :hook ((prod-mode . ws-butler-mode))) +#+END_SRC + * Whitespace Visualation #+BEGIN_SRC emacs-lisp (setq whitespace-line-column 80