2

I've been having trouble getting whitespace to visualize properly. Specifically for 'spaces' I'd like to only display leading spaces, but turning on space white space visualization includes all spaces, not just leading spaces.

I've tried a few things, including setting whitespace-space-regexp and whitespace-hspace-regexp without any luck.

Considering the below screen shot

http://droplr.the-coder.com/EG8EJ8

I thought that since the leading space glyphs are being displayed with the correct face and the inner glyphs are displayed as white that they must have different faces.

So I tried to set the inner glyphs face color to match the buffer's background to 'hide' them. But I've been unable to figure out what face they are.

Here is my whitespace configuration

(setq whitespace-style
    (quote (face
            trailing
            tabs
            empty
            indention
            spaces
            space-mark
            space-after-tab
            space-before-tab
            tab-mark)))

(setq whitespace-space-regexp "\\(^ +\\)")
(setq whitespace-hspace-regexp "\\(^\xA0+\\)")

(setq whitespace-display-mappings
    '((face)
        (space-mark 32 [183] [46])
        (tab-mark 9 [8594 9] [92 9])))

If anyone has any suggestions on how to either programmatically never display the inner space glyphs or simply how to set their face color in such a way as to hide them, I'd greatly appreciate any help.

Stefan
  • 26,154
  • 3
  • 46
  • 84
  • There appears to be a similar (perhaps duplicate) question without any answer: https://emacs.stackexchange.com/q/36010/2287 – lawlist Mar 21 '20 at 22:57

0 Answers0