23

I was looking for a way to sort lines in Geany.

Then found the solution below.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Russell England
  • 9,436
  • 1
  • 27
  • 41

1 Answers1

46

I found the answer on http://crunchbang.org/forums/viewtopic.php?id=24607

  • From the menu bar, select Edit - Format - Send Selection to - Set Custom Commands.
  • Click the Add button in the Set Custom Commands window.
  • Enter sort in the command field, enter sort or a name to your liking in the label field, and then click the OK button.
  • Select the text that you want to sort.
  • Right-click on the selected text and select Format - Send Selection to - sort to sort the selected text.
Dario Seidl
  • 4,140
  • 1
  • 39
  • 55
Russell England
  • 9,436
  • 1
  • 27
  • 41
  • Great answer :) – greuze Feb 07 '17 at 11:04
  • 1
    This works perfectly on Ubuntu and Windows but not on CentOS. – jacknad Jun 26 '17 at 13:09
  • The link is broken: *"Error 400. We're sorry, but we could not fulfill your request for /forums/viewtopic.php?id=24607 on this server."* – Peter Mortensen Mar 30 '20 at 03:11
  • This answer does not work (which is ***very clear*** if you try to follow the instructions in it). Can you update your answer? – Peter Mortensen Mar 06 '21 at 15:45
  • 2
    From a now deleted answer (that should have been a comment): "The steps described here are ***not*** sufficient. You ***must*** also enter something in the "Label" field associated with the Command. In other words, in step 3, enter "sort" in the command field, click on the "Label" field and enter "sort" or a name to your liking. Unfortunately, Geany will just ***ignore*** what you enter in the Command field if you forget to put something in the Label field. IMHO, it is a poor user interface. Hopefully it will be fixed in the future." – Peter Mortensen Mar 06 '21 at 16:28