Shift-tab to indent backwards the line with the cursor in it

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Shift-tab to indent backwards the line with the cursor in it

Post by Mistrel »

When modifying the tab depth of the current line it would be extremely convenient if PureBasic were similar to other editors where it would decrease the indent of the current line with shift-tab.

Yes, we have this already but only if the selection includes multiple lines or the entire current line is selected.

I would like to simply indent backwards the line where the cursor resides whether I have anything selected or not.

One use-case is that I have a line:

Code: Select all

If #True: debug 1: EndIf
I select the first ": " and hit enter and tab to set it on a new line and indent it inwards. Then I select the second ": " and it matches the ended of the block. I can't just shift-tab it backwards; I have to hit backspace several times (I use spaces instead of tabs).

This is just a simple scenario but I find that this is often something that I miss in the PureBasic IDE compared to other editors.
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: Shift-tab to indent backwards the line with the cursor i

Post by #NULL »

i agree, shift+tab should unindent.
..and paste should keep the pasted part selected, because it's often followed by indent/format.

if the argument is that tab does not realy 'indent' but rather just inserts tab/spaces, then shift+tab could at least just remove one level of tab/spaces before cursor (or if there are none, before line).
Post Reply