sort by column

Joerg Fischer jf505 at gmx.de
Tue Nov 14 23:57:07 CET 2006


Scott Woodford wrote:

> I've been meaning to make a macro to sort by the column chosen by a 
> mouse click, but haven't figured out yet how to wait for the position of 
> a mouse click in a macro.

This isn't difficult. For example to bind such a macro to, say,
Ctrl + rigth click  you put the following into your .Xdefaults

nedit*text.Translations: #override \n\
 Ctrl~Shift~Meta~Alt<Btn3Down> : mark(9) grab_focus() macro_menu_command("MyMacro") goto_mark(9)\n

The macro is located at the Macro Menu with name "MyMacro" and uses
the current cursor position, that is, the one at the moment the
macro is called. So, the macro would start with the line
pos = $cursor
to store the position because the cursor is set back to its previous
position immediately.

Cheers,
Jörg


More information about the Discuss mailing list