Page 1 of 1

Un Indent & auto Comment

Posted: Wed Mar 10, 2010 12:05 pm
by Nexus100
Hi All

Would it be possible to have an Unindent feature that moved a selected block of text back one tab space? Currently I can see we can highlight a block of text and press tab to make it tab to the right, but it would be great to be able to do the reverse - makes it easy to format code to look sensible!

Also, I feel an 'Auto Comment' keystroke could be added where once pressed a comment line would be entered at the cursor with the date and possibler time - ths makes it easy to see the last changes you made to your code...something like this to appear:

;10-03-10 14:56:

ready for the user to type the comments after this!

Thanks

Jason

Re: Un Indent & auto Comment

Posted: Wed Mar 10, 2010 12:15 pm
by c4s
Nexus100 wrote:Also, I feel an 'Auto Comment' keystroke could be added where once pressed a comment line would be entered at the cursor with the date and possibler time - ths makes it easy to see the last changes you made to your code...something like this to appear:

;10-03-10 14:56:
Good idea!
But that's what the tool area is for: Develop it for yourself - it shouldn't be too hard. And than if you want to post your solution here. :)

To your other request:
Just use "Shift+Tab". I didn't know it for myself until now but I thought it could be a scintilla shortcut ...et voila see here: http://www.scintilla.org/SciTEDoc.html

Re: Un Indent & auto Comment

Posted: Wed Mar 10, 2010 12:18 pm
by Blue Steel
shit tab on block of selected text un-indents (removes tab)

darn someone beat me too it lol

ROTF.. i just noticed .. in my haste i mistyped the word "shift" ROTF

Re: Un Indent & auto Comment

Posted: Wed Mar 10, 2010 12:20 pm
by c4s
Blue Steel wrote:shit tab on block of selected text un-indents (removes tab)

darn someone beat me too it lol
haha you made me laugh. :D

Re: Un Indent & auto Comment

Posted: Wed Mar 10, 2010 12:36 pm
by Vera
Hi,

just in case anyone likes an overview about ScintillaShortcuts in PB-IDE you can find a list here.

greetings ~ Vera

Re: Un Indent & auto Comment

Posted: Wed Mar 10, 2010 12:43 pm
by Blue Steel
in the help file it tells you about the SHIFT TAB

The PureBasic IDE
-Editing features
Special Tab behaviour:

When the Tab key is pressed while nothing or only a few characters are selected, the Tab key acts as mentioned above (inserting a number of spaces, or a real tab if configured that way).

However when one or more full lines are selected, the reaction is different. In that case at the beginning of each selected line, it will insert spaces or a tab (depending on the configuration). This increases the indentation of the whole selected block.

Marking several lines of text and pressing Shift+Tab reverses this behaviour. It removes spaces/tabs at the start of each line in order to reduce the indentation of the whole block.

Re: Un Indent & auto Comment

Posted: Wed Mar 10, 2010 12:48 pm
by blueznl
Aligning your code by hand is sooooo 2004 :-)