[Geany] Column mode editing

Enrico Tröger enrico.troeger at xxxxx
Wed Mar 12 09:08:07 UTC 2008


On Wed, 12 Mar 2008 07:50:55 +0100, Joerg Desch <jd.vvd at web.de> wrote:

> On Sun, 09 Mar 2008 14:07:00 -0700
> chuck <ctl at arrowtwins.com> wrote:
> 
> > Suppose you want to change the variable names so they all have 2-digit 
> > numbers leading with a zero; so the first line would read
> > char *fill_01 = "Chapter 1";
> 
> Both examples could be done very easily with Geany using a column
> selection together with find+replace. IMO it's much better than a
> zero-width selection.
> 
> A nice feature for a "fill column selection" would be "auto-increment". So
> if I copy a variable several times, ...
> 
> char *fill_1 = "Chapter 1";
> char *fill_1 = "Chapter 1";
> char *fill_1 = "Chapter 1";
> char *fill_1 = "Chapter 1";
> char *fill_1 = "Chapter 1";
> 
> ..it would be very handy to select the 1's as column block, press the magic key and all the 1's would be replaced like this. The auto-increment has to read the first character (the '1' in this case) and use this as starting point.
> 
> char *fill_1 = "Chapter 1";
> char *fill_2 = "Chapter 1";
> char *fill_3 = "Chapter 1";
> char *fill_4 = "Chapter 1";
> char *fill_5 = "Chapter 1";
> 
> This is just an idea. But I think this better should be plugin or a LUA script.
Or any other kind of script/program which can read text from stdin and
print the changed text on stdout. Then you can use the "Send selection
to" command in Geany(*). The only thing you have to do, is to write this
script/program that handles the input, mangles it in some way and
prints it out. Geany will take care of the selection handling.


(*) which should be used with care on Windows, it might work, it might
fail.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20080312/92678979/attachment.pgp>


More information about the Users mailing list