Sublime Forum

ST (wrongly?) shows tabs in the default settings file. Why?

#1

My settings:

{
  "detect_indentation": true,
  "draw_white_space": ["leading_mixed", "enclosed_tabs"],
  "translate_tabs_to_spaces": true,
}

If I open a .json file indented with tabs, the tabs are not drawn. And that’s exactly what I expected, because detect_indentation overrides translate_tabs_to_spaces.

But if I open the settings window (Command-Comma on macOS, and I suppose Control-Comma on Linux and Windows), the tabs in the default settings file (which is indented using only tabs!) are drawn. Why is that?

image

0 Likes

#2

My hunch is indentation dedection not being performed automatically for the left readonly view. Thus translate_tabs_to_spaces wins.

Manually calling Indentation: Detect from Command Palette while left view is focused switches indentation style from 4 spaces to tabs.

setting detect_indentation false on the other hand also causes right view using spaces when opening.

I’d call it a bug.

1 Like