Sublime Forum

[SOLVED] How to disable the "default" indentation of a file?

#1

Hi!

I’m using ST build 3122 on Ubuntu 16.04 x64.

I have copied some C# code that was indented by 4 spaces.

When I want to use shit+tab (one or multiple times) to put all text to the left, and then indent with my tabs, ST inserts 4 spaces, and I’ve configured it to only insert 2 spaces.

My options related to this issue are:

"tab_size": 2,
"translate_tabs_to_spaces": true,
"word_wrap": true,
"auto_indent": true,
"smart_indent": true,
"tab_completion": true,
0 Likes

#2

There is a setting detect_indentation that defaults to true that makes Sublime detect what the tab settings are when you load a file that might be messing with your settings, so that might be something to check into.

I think it only takes effect on loading a file and not just from pasting text in, but I’m not 100% sure.

You may also want to verify that the tab settings are what you expect by checking the right side of the status bar, as there may be a syntax specific setting overriding things.

0 Likes

#3

Thanks mate, works like a charm, just what I wanted.

0 Likes