Sublime Forum

Tab puts is 2 spaces just after writing code and 4 spaces if pressed again

#1

After finishing a line of code, if I press tab, it firstly puts 2 spaces and if tab is pressed again, it changes to 4.
By default, tab is set to 4 spaces.
Why is this happening and how can I change to tab = 4 spaces consistently?

0 Likes

#2

Does this happen in safe mode?

0 Likes

#3

Nope. I don’t think my editor is in safe mode.
This is a gif of the problem.
In both cases, tab was pressed.
sublime

0 Likes

#4

What he’s telling is that you should first try to reproduce the issue in safe mode (Look at the docs to see how to launch safe mode) and then see if the issue persists. If it persists, it may indicate a problem in the core, otherwise it could be some package that’s faulty.

0 Likes

#5

That’s expected behavior. Sublime Text inserts as many spaces as the equivalent tab would be.

0 Likes

#6

You may want to try playing with this setting:

	// If translate_tabs_to_spaces is true, use_tab_stops will make tab and
	// backspace insert/delete up to the next tabstop
	"use_tab_stops": true,
1 Like