Sublime Forum

Hard tabs vs. Soft tabs

#1

I’m not finding this in the documentation.

How do I select the usage of hard tabs vs. soft tabs in my files?

thanks,
Gavin Bowlby

0 Likes

#2

Not using hard tabs myself, but does this help?

https://www.sublimetext.com/docs/indentation

0 Likes

#3

0 Likes

#4

Thanks! I think this is file-specific, right?

I’d like this to be applied to all of my files. I think the link that Niklas provided shows how I can do this across all files.

Thanks so much for your help!
Gavin

0 Likes

#5

That is correct, except that the link is very much outdated and for ST1.

You can read about the current settings (and a brief documentation) in the “Preferences > Settings - Default” file and modify them in “Preferences > Settings - User”.

0 Likes

#6

Thanks! I made the change as shown in Preferences > Settings - Default and applied them to Preferences > Settings - User and they seem to work ok.

I have a set of System Verilog files I’ve been editing, and Sublime seemed to figure out that I wanted soft tabs with a tabstop of 3 ok automatically, but I occasionally saw Sublime inserting hard tabs into some of my files when I was using the tab key.

I’ll update this item if I have any more problems with this.

0 Likes

#7

By default, ST attempts to detect the indentation style used (tabs vs spaces) automatically when loading a file. If it’s using spaces, it also attempts to detect the indentation size.

0 Likes