CMSCSS
CMSCSS

Reputation: 2176

SublimeText 3 - Nothing works to force indentation to 4 spaces

Issue:


Have tried:


Questions:

  1. Does it seem weird that changing the spaces from the menu doesn't even work? SublimeText states that the tab indentation is 4 spaces - but it's not.
  2. Does anyone know how to force SublimeText to apply a tab indentation to a document or to a project?

Update:

Spaces not recognised as indentation

Upvotes: 4

Views: 1794

Answers (2)

Tejas Shetty
Tejas Shetty

Reputation: 715

view of a typical sublime text window There is a status bar at the very bottom of the window. If not visible go to View> Show status bar. At the rightmost end you will see the language of the current file, Here python. After that, it will show you whether you are using tabs or spaces and how many of them are being used. Click on it and you will get Indent menu from status bar second rightmost

Taken from https://css-tricks.com/changing-spaces-tabs-sublime-text/

Upvotes: 1

Azriel
Azriel

Reputation: 386

The only command from that list that actively changes all indentation in the current file is the > Indentation > Convert Indentation to Spaces. The other settings only take effect from "that point on" (i.e. existing indentation will remain tabs, newly created ones will be spaces). Also, make sure you try running the command after selecting Indentation > Indent using spaces, and Tab Width 4

Could you check that running Convert Indentation to Spaces, and with "draw_white_space": "all", on, that indentation is shown using semi-transparent dots? Navigation with the caret will still "jump" the 4 spaces.

Only other thing I can think of is it's somehow being a read-only file.

Can't comment because I've less than 50 rep.

Upvotes: 6

Related Questions