[Geany] Reverse line order

Frank Lanitz frank at xxxxx
Fri May 8 10:39:09 UTC 2009


Hi Gregor, 

On Fri, 08 May 2009 11:51:57 +0200
Gregor Geiermann <gregor.geiermann at openinformation.org> wrote:

> is it possible with Geany to reverse the order of lines in a document?
> 
> I have a huge HTML table where six columns have to be reordered in each
> row - the rest of the lines of the files have to stay as they are, of
> course.
> 
> So I wonder if there is a way with Geany to mark six lines and tell
> Geany to "reverse the order"? So that
> 
> <td class='rang2008' headers='rang2008'> k.A.  </td>
> <td class='rang2007' headers='rang2007'> 90 </td>
> <td class='rang2006' headers='rang2006'> 107 </td>
> <td class='rang2005' headers='rang2005'> 109 </td>
> <td class='rang2004' headers='rang2004'> 99 </td>
> <td class='rang2003' headers='rang2003'> 81 </td>
> 
> becomes
> 
> <td class='rang2003' headers='rang2003'> 81 </td>
> <td class='rang2004' headers='rang2004'> 99 </td>
> <td class='rang2005' headers='rang2005'> 109 </td>
> <td class='rang2006' headers='rang2006'> 107 </td>
> <td class='rang2007' headers='rang2007'> 90 </td>
> <td class='rang2008' headers='rang2008'> k.A.  </td>

I'm afraid I don't know a build in function that is doing this, but I
got two ways in my mind: 
1.) Send selection to command function of Geany and build a small shell
script which is using sort -r -k (or if this is not working maybe awk)
(untested as you might can imagine) 
2.) Implementing such a functon by a plugin as done with the
shiftcolumn plugin. 

Regards, 
Frank
-- 
Frank Lanitz <frank at frank.uvena.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20090508/2c627bd0/attachment.pgp>


More information about the Users mailing list