Trailing white spaces are annoying. Forunately, SublimeText automates this for us by simpling adding this options to our Sublime config:
Except we are screwed if we use a templating language. Because whitespace will be trimmed in nested element which means you won’t have a space between words. (Without littering your Jade with .)
Thanks to StackOverflow user myk-willis, there’s a solution:
- Add
trim_trailing_white_space_on_save
to your Sublime user config (presuming you want this as your default). - Open a file-type where you do not want non-breaking spaces (i.e. Jade).
- Go to
Preferences > Settings-More > Syntax Specific
and allow trailing spaces for that specific syntax: