Sublime Forum

Turn off whitespace trim for Markdown

#1

I like to have trailing whitespace trimmed for most files I edit. But Markdown uses two spaces at the end of a line for a manual line break.

Is there a way to turn off whitespace trimming just for Markdown syntax?

1 Like

#2

Yes, you can open a Markdown file, then go to the menu Preferences -> Settings - Syntax Specific, then you can set:

    "trim_automatic_white_space": false,

Then it would disable automatic trim for Markdown files. See:

  1. https://www.sublimetext.com/docs/3/settings.html
  2. http://docs.sublimetext.info/en/latest/customization/settings.html

For references.

5 Likes

#3

Thanks! I’ve been using ST for years and I had totally missed this feature. Very useful.

1 Like