[gps-users] Indent / unindent block ?

Gautier de Montmollin gdemont at hotmail.com
Thu Sep 13 22:16:23 CEST 2007


Indeed, I was thinking to something more basic than rectangular selections, 
just like Comment / Uncomment (also in edit menu, Ctrl+..., context menu): a 
way shift left or right the lines of selection or the line where the cursor 
is (no selection). More "algorithmically", insert n spaces on the left of 
each the line of the selection, and, reversely, to remove n but only if each 
line has (still) n spaces on its left or is blank (n=indentation spaces).
You have something like that in plenty of editors...
Maybe a "nice to have" (independently of other plug-ins) ?
Gautier

----Original Message Follows----
Date: Thu, 13 Sep 2007 17:38:58 +0200

On Thursday 13 September 2007 17:28:09 Gautier de Montmollin wrote:
 > Being relatively new to GPS, first: I'm impressed by the 2007 GLP edition
 > for MS Windows, it is very stable and useful (never crashed, unlike
 > previous versions which hanged pretty quickly).

Thanks

 > A little question: is there a way to indent or unindent a block (selected
 > text) ?
 > This is a nice functionality of AdaGIDE I'm missing with GPS... unless I
 > overlooked something ?

That is doable through the "rectangles" plug-in, which you activate
through /Tools/Plug-Ins.
Then you have a menu /Edit/Rectangles, where you can use "Open".

If you are talking about automatic indentation, this is of course available
just by pressing your auto-indent key when the block is selected.

I thought I had done a similar python script for any text, but can't find 
it.
This is of course not too difficult to write, maybe you would like to have a
shot at it ?

regards
Emmanuel

_________________________________________________________________
Can you find the hidden words?  Take a break and play Seekadoo! 
http://club.live.com/seekadoo.aspx?icid=seek_hotmailtextlink1



More information about the gps-users mailing list