2

It seems that whitespace is no longer visible while editing files, since this github issue.

Now I usually end up seeing the whitespace only after I have saved or even commited my files sometimes.

  1. How can I see whitespace in spacemacs while editing, as was the case before ?
  2. Are there any manual settings like save-hooks which remove the whitespace automatically ?
  3. Any other manner in which I should proceed to prevent the annoying whitespace to be commited?

Any help would be appreciated. Thanks.

1

3 Answers 3

2
  1. (setq show-trailing-whitespace t)
  2. You can use the package ws-butler and enable ws-butler-mode. This will remove trailing whitespace on save for any lines that have been modified. At one point ws-butler was enabled by default, that may still be the case.
0

I was finally able to display whitespace, by using customize-set-variable

  1. M-x and then customize-set-variable.
  2. Search for the variable show-trailing-whitespace.
  3. Change it's value to on by toggling it's state.
  4. Change the State to *SAVED and set*.

I will further update the answer as and when I figure out the solutions to (2) and (3).

0

The standard way to customise these variables is with a line added to dotspacemacs/user-config saying (setq show-trailing-whitespace t)

so:

(defun dotspacemacs/user-config ()
  "Configuration function for user code.
 This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
  (setq show-trailing-whitespace t)
)

However, this seems to be working fine on develop right now, if you update your distribution, it should just work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.