Sublime Forum

Defective behavor in "Guess settings from buffer"

#1

Is this option provided by Sublime or some plugin?
I have a file that indentation is guessed wrong (not allowed to be uploaded)

2 Likes

#2

both - its provided by ST in the Default package in the form of a plugin

2 Likes

#3

Should I provide a test case on this bug or create a new bug altogether?

It is a little different: A 2/spaced .js file detected as 4/tab

1 Like

#4

maybe create a new one, we can always mark it as a duplicate later, and your test case won’t get lost

1 Like

#5
0 Likes

#6

The indentation detector want at least 10 indented lines to make an educated guess.
Your sample file has only 2 indented lines, so doesn’t meet the requirement.

You can run this command in the console to lower the threshold to 2 and make it works with your file:
view.run_command('detect_indentation', {'threshold': 2})

0 Likes

#7

In hindsight, maybe I should’ve linked my issue way earlier - since I don’t think I was ever working on a file of this size originally.

However, for the sake of minimizing (and/or obsfucating) it ended up like this. :confused:

0 Likes

[ST4] Why ST4 doesn't respect the tab size=4 setting?