Sublime Forum

Blank space formatting

#1

I’m having problems with my SCSS compiler. The reason for this, Sublime is using an HTML blank space (\x{a0} or  ) instead of a normal one in autocompleting. How can I change this?

50
.content-table spacing is correct, table spacing is wrong

0 Likes

#2

From your image it looks like things are indenting with tabs. Does it say something like Tabs: 4 in the lower right of the window in the status bar?

If so, click on that and choose the Convert indentation to spaces option and see if that fixes your problem. If so, then you want to adjust these settings:

	// Set to true to insert spaces when tab is pressed
	"translate_tabs_to_spaces": false,

	// The number of spaces a tab is considered equal to
	"tab_size": 4,

	// Set to false to disable detection of tabs vs. spaces on load
	"detect_indentation": true,

The first one controls whether indentation is done with physical tabs (which it appears to be in your image) or spaces; it defaults to tabs but it sounds like you want it to be spaces.

The second one controls how many characters wide a “tab” is; for physical tabs it controls how big they should look because tabs have no size, whereas for indentation with spaces it controls how many spaces get inserted.

The last one is for controlling whether or not Sublime should examine files when they load to see if they’re indented with tabs or spaces (and in the case of spaces, how big the indentation is). Commonly people turn off tab indenting but have issues because this setting is turned on, which makes Sublime revert the setting when files are opened that were previously created.

You can tweak all of these options globally by using Preferences > Settings and adding them to the right hand pane, or you can also adjust them on a file type by file type basis by opening a file of a given type (in your case an scss file) and then using Preferences > Settings - Syntax Specific instead.

0 Likes