Sublime Forum

How to treat multiple spaces as tabs?

#1

I’ve always used tabs for indentation because every file that is indented using spaces takes twice as long to move through the indentation (using the arrow keys).

Is there a way to reliably configure ST3 so that I can treat multiple spaces as virtual tabs so that I can navigate through them the same way as I would if I were using hard tabs?

Thanks!

0 Likes

#2

Usually ctrl+left or ctrl+right helps to jump over white spaces (be it spaces or tabs)

0 Likes

#3

Thanks!

So there is no way to set behavior to “smart”. Damn.

0 Likes

#4

No one said there was no way. He just suggested using ctrl+left and ctrl+right which will jump over white space.

You can do what you are saying, but you will have to override the right and left arrow key’s default behavior in a plugin. I personally don’t think it is worth it, so I really don’t plan on looking into it and detailing how you might accomplish it here.

0 Likes

#5

To be honest, Sublime’s tab/space handling, at least out of the box, is relatively weak compared to just about every other programmers’ editor out there. There also don’t seem to be any plugins to bring it up to the same level as some of the other editors out there. At least none that I’ve been able to find so far, anyway, but I’d be pleased to find out I’m wrong.

0 Likes

#6

Yeah, this is a very weak spot in ST. Is there an issue on this?

0 Likes

#7

Being honest: Using tabs or spaces for indent is mostly a personal thing, so is navigating, too. If working in a team there may be a rule to use spaces or tabs.
Speaking for myself: Spaces and nothing else. Being a heavy keyboard user navigating spaces with is like breathing - i just do it

0 Likes

#8

[quote=“vjik”]

Yeah, this is a very weak spot in ST. Is there an issue on this?[/quote]

Not as far as I know of. I think I posted something to this effect in the “Feature Requests” forum and got blown off.

[quote=“mbajohr”]Being honest: Using tabs or spaces for indent is mostly a personal thing, so is navigating, too. If working in a team there may be a rule to use spaces or tabs.
Speaking for myself: Spaces and nothing else. Being a heavy keyboard user navigating spaces with is like breathing - i just do it[/quote]

I’m a spaces guy too, but some coding standards talk about tabs for indentation and spaces for alignment… and then there are some formats, like Makefiles, where tabs vs. spaces are very important.

0 Likes