Sort at Column of Cursor

Sort at Column of Cursor

2
NewbieNewbie
2

    Nov 16, 2012#1

    I used to have an option to sort at the column where my cursor was sitting. I have a new job and a much newer version of UE. I cannot find this option in the settings. Does it still exist and can someone tell me how to activate it?

    6,602548
    Grand MasterGrand Master
    6,602548

      Nov 16, 2012#2

      On next sort open File - Sort - Advanced Sort/Options. Press key F1 to open the help page for this dialog. As you can read on the help page, using value 0 for Start Column of a Key x, results in sorting according to column of caret. Most often for sorting based on current caret position the following key options are used:

      Key 1: 0 -1
      Key 2: 0 0
      Key 3: 0 0
      Key 4: 0 0

      With those values all lines of the file respectively all selected lines are sorted with column of caret as start column and evaluating rest of the lines for the sort.

      The sort settings are remembered and used again on next sort by running command File - Sort - Sort File (Using Current Options).

      It is possible to write a little script executed by a hotkey for sorting lines based on current caret column, or record such a sort into a macro and save it with a hotkey perhaps together with other macros into a macro file being configured to be loaded automatically on every start of UltraEdit, to quickly sort the lines according to current column without the need to change the sort settings. The sort settings defined by a macro or script for a sort executed from within the macro or script do not modify the current settings as displayed in Advanced Sort/Options.

      2
      NewbieNewbie
      2

        Nov 19, 2012#3

        Thanks, that is exactly what I was looking for.

        3
        NewbieNewbie
        3

          Jan 20, 2017#4

          Thank you. Just want I needed. Different settings from the version I was using.