Home Download Buy Blog Forum Support

Remove tab-character (\t) on shift+tab (ST2)

Remove tab-character (\t) on shift+tab (ST2)

Postby Exterior on Thu Apr 04, 2013 10:19 am

ST2 is a great editor, in my opinion it's better than Kate, GEdit, Geany and even better than big players like Komodo Edit.

But there is one small thing I miss from other editors (especially Komodo Edit) I would love to see in my Sublime Text.
With the Tab-key I can insert tabs (character \t) (well, that's no big surprise). Sometimes I accidentally insert to many tabs.
In this case I have to remove the single spaces ("indent using spaces" is activated) with backspace. That's not really comfortable.

In Komodo Edit I can use shift+tab to remove one tab-character, so I can quickly and comfortable correct my misstake. In ST2 I can only unindent the whole line with this key-binding.

Does anybody know a plugin, key-binding, workaround or something to teach my sublime this behaviour?
Exterior
 
Posts: 3
Joined: Thu Apr 04, 2013 9:39 am

Re: Remove tab-character (\t) on shift+tab (ST2)

Postby shancat on Thu Apr 04, 2013 10:56 am

If multiple spaces are being inserted then no tab characters are being inserted (\t). You can check this is true if in your preferences you have translate_tabs_to_spaces set to true. If it is set to true then set use_tab_stops to true as well and when you press backspace you will delete up to the last tab-stop.
shancat
 
Posts: 12
Joined: Thu Feb 28, 2013 6:57 am

Re: Remove tab-character (\t) on shift+tab (ST2)

Postby Exterior on Thu Apr 04, 2013 11:38 am

But then I can't tab to a specific point / width and then go back one single space. I would have to make less \t-characters / remove one \t and then insert the remaining spaces.

Is it possible to remove one space using backspace but delete up to the previous tab-stop with another key-binding?

Edit:
I just noticed, that tab-stops only work for the beginning of a line.

Example:

Code: Select all
$a    = 1;
$abcd = 2;


If I use tab to indent the "="-characters to the same column, there is no tab-stop in front of the "=".
Exterior
 
Posts: 3
Joined: Thu Apr 04, 2013 9:39 am

Re: Remove tab-character (\t) on shift+tab (ST2)

Postby prmaple on Thu Apr 04, 2013 12:26 pm

Exterior wrote:But then I can't tab to a specific point / width and then go back one single space. I would have to make less \t-characters / remove one \t and then insert the remaining spaces.

Is it possible to remove one space using backspace but delete up to the previous tab-stop with another key-binding?

Edit:
I just noticed, that tab-stops only work for the beginning of a line.

Example:

Code: Select all
$a    = 1;
$abcd = 2;


If I use tab to indent the "="-characters to the same column, there is no tab-stop in front of the "=".


use the plugin alignment then you don't have to insert spaces yourself.
prmaple
 
Posts: 84
Joined: Sun Dec 25, 2011 11:06 am
Location: Melbourne

Re: Remove tab-character (\t) on shift+tab (ST2)

Postby Exterior on Thu Apr 04, 2013 3:14 pm

This plugin is pretty cool and I will give it a try.

But that's actual not what I'm looking for. With this, I have to write my code "quick 'n dirty" and after that I have to look through the code and give it some nice formatting. But I want this feature because I want the code clearly while coding, not after the work is done ;)

Is there really no way to go one tab-stop back ore something on shift+tab inside of a line (not at the beginnig of the line)?
Exterior
 
Posts: 3
Joined: Thu Apr 04, 2013 9:39 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 21 guests