On Thu, Mar 5, 2009 at 4:23 AM, Frank Lanitz frank@frank.uvena.de wrote:
On Thu, 5 Mar 2009 00:21:56 +0100 Enrico Tröger enrico.troeger@uvena.de wrote:
I actually think this would be an awesome improvement and could go into Geany but it still needs someone to write it. So, patches are welcome.
Hmm...ok. Since I'd like to learn something, can somebody of you give me a near life case study for this feature? Even I guess I understood what it should do, I'm ot sure, why and when to use it.
It sounds like rectangle-mode in Emacs, or column-editing mode in TextMate.
One common use case is formatting data or code.
For instance, say I wanted to work with the whitespace between the first and second tuple elements in each row of the follow code:
call_foo([ (a, 1, 1), (b, 2, 2), (c, 3, 3), (d, 4, 4), (e, 5, 5) ])
I would select a rectangular region of text between the comma in the first row, and the second tuple element in the fifth row (covering the whitespace right down the middle). Then I can use "shift-left" and "shift-right" commands to move the entire rectangle around, "grow" or "shrink" commands to change the whitespace, or "kill" to clear the space and close it up.
In Emacs, you select the rectangle by dropping a mark in one corner, and placing the cursor in the other. In TextMate, you can hold down a key and drag the mouse to select a rectangle of text on the screen.
Maris