Sorting data



  • Is there a way to automatically sort text as integers descending everytime new data is added, or do I have to do it manually?



  • @Keir said in Sorting data:

    Is there a way to automatically sort text as integers descending everytime new data is added, or do I have to do it manually?

    There isn’t an auto sort setting in Notepad++ as far as I know. However you can easily set up a shortcut (2 keys minimum) to activate a sort as and when required. Alternatively you could generate a macro which could sort and also perform other steps if you needed other functions performed at the same time.
    If you looked at plugins you could likely build some automation into the sorting, but that might entail learning a new language, such as PythonScript. Check out the Plugins on offer, maybe one of those might help you. Go to
    https://notepad-plus-plus.org/resources/
    and the plugins are linked from there.

    I personally think setting a shortcut to the sort (of your choice) is the way to go. Select from the “Settings” menu, “Shortcut Mapper” and scroll down until you see the sorting options. on mine they are numbered 46-53. Provide a 2 keystroke option (3 or 4 keys also an option) to setup the shortcut and you’re done. When needed, execute that 2 key shortcut and it will perform the requested sort.

    Terry



  • @Terry-R Thankyou, I need to sort data numerically for a leaderboard. I will try your advice.



  • @Terry-R said in Sorting data:

    you can easily set up a shortcut (2 keys minimum)

    Nitpick: Why are 2 keys the minimum? What about just assigning it to F1 as a one-key example? :-)



  • @Alan-Kilborn said in Sorting data:

    Why are 2 keys the minimum?

    I steer clear of creating 1 key shortcuts. You never know when something else will want that “officially” and then you’re out in the cold and having to remember a different hot key. Also it’s a lot harder to hit the 2 keys together by mistake, when a 1 key miss hit could have severe consequences.

    Terry


  • Banned

    Hello,@Keir
    Please follow this step,To sorting data.

    Step 1: First to select Edit menu than select Line operation.
    Step 2: After select Sort Lines Lexicographically ascending.

    I hope this information will be useful.
    Thank you.


Log in to reply