A while back I read on this list how one could select a section of code and then trigger a sort of the contents while in the editor. I've searched the archives but cannot seem to find the reference.
Does anyone remember how one can accomplish that task and advise -OR- link to a similar tool for use within geany?
Thank you.
Hey there,
R.Mariotti wrote:
A while back I read on this list how one could select a section of code and then trigger a sort of the contents while in the editor. I've searched the archives but cannot seem to find the reference.
Does anyone remember how one can accomplish that task and advise -OR- link to a similar tool for use within geany?
You'll need the Line Operations plug-in, from your package manager or from here: https://plugins.geany.org/
Once you have that installed, go here:
Tools --> Line Operations --> Sort Lines Ascending
or:
Tools --> Line Operations --> Sort Lines Descending
Line Operations' option to Sort Lines Ascending||Descending looks good
But when I try it, instead of sorting my Selection, it sorts the whole file ...
Whereas in the same file, Geany's Edit->Format->Send Selection to->Sort sorts just the Selection, as expected
So what am I doing wrong?
Richard H [Geany 1.30.1 on Ubuntu 12.04] --
On 04/16/2017 02:03 AM, Little Girl wrote:
Hey there,
R.Mariotti wrote:
A while back I read on this list how one could select a section of code and then trigger a sort of the contents while in the editor. I've searched the archives but cannot seem to find the reference.
Does anyone remember how one can accomplish that task and advise -OR- link to a similar tool for use within geany?
You'll need the Line Operations plug-in, from your package manager or from here: https://plugins.geany.org/
Once you have that installed, go here:
Tools --> Line Operations --> Sort Lines Ascending
or:
Tools --> Line Operations --> Sort Lines Descending
Hey there,
rch wrote:
Line Operations' option to Sort Lines Ascending||Descending looks good But when I try it, instead of sorting my Selection, it sorts the whole file ... Whereas in the same file, Geany's Edit->Format->Send Selection to->Sort sorts just the Selection, as expected So what am I doing wrong?
I'm not sure. I just opened Geany, typed a few unsorted lines of text into it, selected some of them, used Line Operations to sort them, and only the selected lines got sorted. If it helps any, I'm using Geany 1.30.1 under Linux Mint MATE, and I hadn't saved the file when I did the test.
On 16 April 2017 at 09:27, R.Mariotti r.mariotti@fdcx.net wrote:
A while back I read on this list how one could select a section of code and then trigger a sort of the contents while in the editor. I've searched the archives but cannot seem to find the reference.
Does anyone remember how one can accomplish that task and advise -OR- link to a similar tool for use within geany?
You don't say which OS you are using. On linux you can use Menu->edit->format->send selection to to send the selection to the sort command and the sorted result will replace the selection.
Don't know if there is an equivalent command on windows.
Cheers Lex
Thank you. _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users