Community
    • Login

    Sort tabs by creation date

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 4 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ashil KrishnanA
      Ashil Krishnan
      last edited by

      Hi team,

      I have been using notepad++ for some time now. The issue was noticed from very first update I installed where all my tabs were jumbled between different tabs after an update.
      I install these updates believing they might help with new features and bug fixes, however it creates this issue every time I install an update. I have to forget all my recent tabs and continue with what I have.

      Any one has any suggestions ?

      PeterJonesP Daniel TomberlinD 2 Replies Last reply Reply Quote 1
      • PeterJonesP
        PeterJones @Ashil Krishnan
        last edited by PeterJones

        @Ashil-Krishnan ,

        I am surprised that doing an update of Notepad++ kept your active session but changed the tab order – I would have thought if it kept sessions.xml session.xml that the order would not be affected.

        The Window menu’s Windows… entry has some capability of sorting the tabs – you can click on the title bar for each of the columns to sort that list by that column, then click on Sort Tabs to make the tabs in the editor follow the order listed in the dialog box. But that only has Name, Path, Type, and Size, no date. You could follow the instructions in the FAQ to ask that the developers add the Last Modified Time 🛈 as a column in the Window > Windows… document list dialog, so that sorting by time could be accomplished easier. If you do submit a feature request, be sure to paste a link to that request here, so that we can easily find the status from here.

        But that may take some time to be implemented and released (if ever). So, as a workaround:

        The auto-sort-tabs script in @Alan-Kilborn’s post in “Auto sort tabs (real-time)” could be modified to sort by file date, rather than alphabetically (the post I linked to, near the end of that topic, has improvements that were made, so would be the best starting point for your modifications).

        Daniel TomberlinD 1 Reply Last reply Reply Quote 2
        • Daniel TomberlinD Daniel Tomberlin referenced this topic on
        • Daniel TomberlinD Daniel Tomberlin referenced this topic on
        • Daniel TomberlinD
          Daniel Tomberlin @PeterJones
          last edited by

          @PeterJones, I replied to the other post you referenced to see if anyone would consider this feature request, specifically @Alan-Kilborn. I’ll be sure to post back here if any solution is provided… Thanks!

          1 Reply Last reply Reply Quote 0
          • Daniel TomberlinD Daniel Tomberlin referenced this topic on
          • Daniel TomberlinD
            Daniel Tomberlin @Ashil Krishnan
            last edited by

            @ashil-krishnan, just an FYI…

            I did notice that the sessions.xml file in the Notepad++ folder under the …\AppData\Roaming\ path does have a date at the end of the “backupFilePath” parameter. So the end of the path reads “…\new1@yyyy-mm-dd_123456,” however, saved file paths do not have anything populated in that parameter. There are also the parameters “originalFileLatModiTimestamp” and “originalFileLatModiTimestampHigh” that are “0” in the “new” tab, but have 8 numbers in the saved file, one negative and the other positive respectively. I may be able to figure out a way to manually sort my tabs by modifying the startPos=“2488” and endPos=“2488” in this file if I figure out what those numbers mean, including the number at the end of the aforementioned “backupFilePath” parameter too. Below is an example of what I’m seeing in case anyone has any answers:

            <File firstVisibleLine="0" xOffset="0" scrollWidth="9423" startPos="120" endPos="120" selMode="0" offset="0" wrapCount="1" lang="SQL" encoding="-1" userReadOnly="no" filename="\\mypath\myfilename.sql" backupFilePath="" originalFileLastModifTimestamp="-386892058" originalFileLastModifTimestampHigh="30736076" mapFirstVisibleDisplayLine="-1" mapFirstVisibleDocLine="-1" mapLastVisibleDocLine="-1" mapNbLine="-1" mapHigherPos="-1" mapWidth="-1" mapHeight="-1" mapKByteInDoc="1140719616" mapWrapIndentMode="-1" mapIsWrap="no" />
            
            <File firstVisibleLine="6" xOffset="0" scrollWidth="3990" startPos="2488" endPos="2488" selMode="0" offset="0" wrapCount="18" lang="SQL" encoding="-1" userReadOnly="no" filename="new 1" backupFilePath="C:\Users\username\AppData\Roaming\Notepad++\backup\new 1@2020-09-01_101742" originalFileLastModifTimestamp="0" originalFileLastModifTimestampHigh="0" mapFirstVisibleDisplayLine="-1" mapFirstVisibleDocLine="-1" mapLastVisibleDocLine="-1" mapNbLine="-1" mapHigherPos="-1" mapWidth="-1" mapHeight="-1" mapKByteInDoc="0" mapWrapIndentMode="-1" mapIsWrap="no" />
            

            Thanks in advance for any solutions! :)

            Alan KilbornA 1 Reply Last reply Reply Quote 0
            • Alan KilbornA
              Alan Kilborn @Daniel Tomberlin
              last edited by

              @daniel-tomberlin said in Sort tabs by creation date:

              the startPos=“2488” and endPos=“2488” in this file if I figure out what those numbers

              These probably refer to an active selection, or the caret location if the numbers are the same. Thus, this file would open with no text being selected, and the caret at position 2488 in the file. If the numbers were different, the file would open with text selected between those 2 position points.

              It sounds rather dubious to me to try to script something, and involve a session file.

              Daniel TomberlinD 1 Reply Last reply Reply Quote 3
              • Daniel TomberlinD
                Daniel Tomberlin @Alan Kilborn
                last edited by

                @alan-kilborn, I reviewed this and you’re correct. If those numbers are the same, that’s where the cursor is located (no selection made) and if it differs, depending where one starts the selection from top to bottom or vice versa will determine what those numbers are between these parameters.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors