randomPoison / text-edit

1 stars 0 forks source link

Add visible whitespace option #7

Open randomPoison opened 7 years ago

randomPoison commented 7 years ago

For #6 the proposed solution is to make sure whitespace characters are invisible, but an alternate solution is to replace whitespace characters with visible replacements. This is a common feature in text editors used for software development, as it is often useful to be able to see things like trailing whitespace or whether the file is using tabs or spaces for indentation. Below is an example of how Atom renders visible whitespace for me (it's a bit hard to see with the color scheme, sorry):

visible_whitespace_atom

The basic functionally (replacing whitespace characters with substitutes) is implemented on the visible-whitespace branch. Unfortunately, making whitespace visible in the same color as the other characters makes the text very hard to read (go figure), so before this can be used we'll need to add a way to make the visible whitespace characters a different color from the rest of the text.