Community
    • Login

    Set max width of tab, show the list of file opened

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 4 Posters 1.3k 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.
    • ReporterXR
      ReporterX
      last edited by

      1. How can I set the max width of tab in the tab bar? Sometimes the file name is too long and it takes too much screen space.
        2.How can I see the list of files opened in the same order as the ones in the tab bar. Ctrl + tab has the list but the order is not the same as the one in the tab bar.
        Thank you.
      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @ReporterX
        last edited by

        @ReporterX

        1. I don’t think you can.
        2. Have you tried the Window menu, then choose the Window… entry? Not sure what your end goal is (for example, I didn’t find that you can copy this list anywhere, although a ctrl+a will select all of the text).
        1 Reply Last reply Reply Quote 3
        • ReporterXR
          ReporterX
          last edited by

          1. That Window is what I want. Do you know if there is any shortcut key to open that window?

          Thank you for your reply.

          Meta ChuhM 1 Reply Last reply Reply Quote 0
          • Meta ChuhM
            Meta Chuh moderator @ReporterX
            last edited by

            @ReporterX

            a shortcut key combination to the window menu currently depends on your localised language.

            on an english notepad++ it is alt+w+w (keep altpressed and tap on w twice)
            ps: this way you can also sort all tabs alphabetically, by pressing alt+w+w+t followed by esc.

            ReporterXR 1 Reply Last reply Reply Quote 4
            • ReporterXR
              ReporterX @Meta Chuh
              last edited by

              @Meta-Chuh Thank you.

              1 Reply Last reply Reply Quote 1
              • guy038G
                guy038
                last edited by guy038

                Hello, @reporterx, @alan-kilborn, @meta-chuh and All,

                Here is a way to get a list of all opened files, in the two views of the N++ current session :

                • Open the Find dialog ( Ctrl + F )

                • SEARCH (?s).*\K

                • Tick the Regular expression search mode

                • Left click on the Find All in All Opened Documents button

                => A few moments later, the Find result panel appears, with the absolute paths of all opened files and the very last line of each file displayed

                • Select all the contents of the Find result panel ( Ctrl + A )

                • Open a new tab ( Ctrl + N )

                • With the mouse, just “drag and drop” that selection, from the Find result panel to the new tab window

                • Open the Replace dialog ( Ctrl + H )

                • SEARCH (?s-i)^(Search "|\t).+?(\r?\n|\r)|\x20\(1\x20hit\)$

                • REPLACE Leave EMPTY

                • Tick the Wrap around option

                • Left click on the Replace All button

                Et voilà ! You’re just left with the exact list of all opened files of your current session, including the new # ones ;-))

                Best Regards,

                guy038

                P.S. :

                • The first search regex (?s).*\K matches all file contents from current cursor location (?s).*, then the \K discards this match and only matches the virtual or real last line of the current file scanned !

                • The second search regex (?s-i)^(Search|\t).+?(\r?\n|\r)|\x20\(1\x20hit\)$ matches 3 different ranges of characters :

                  • The very first line, Search “(?s).*\K” (xx hits in xx files), so the equivalent regex (?s-i)^Search.+?(\r?\n|\r)

                  • The single line of each file, beginning with a tabulation character,folowed with Line ####:, so the equivalent regex (?s)^\t.+?(\r?\n|\r). Note that I did not choose the obvious syntax (?-s)^\t.+\R, on purpose ! Indeed, you may have an executable file among all your opened files and, in this case, any char may be present, after the part Line ####:. Thus, it’s best to search for any char till the nearest true EOL character(s) ;-))

                  • The string (1 hit), preceded with a space character, at the very end of the line, after the absolute path of each file, so the equivalent regex \x20\(1\x20hit\)$

                ReporterXR 1 Reply Last reply Reply Quote 3
                • ReporterXR
                  ReporterX @guy038
                  last edited by

                  @guy038 Thanks a lot for the detailed explanation. Thank you.

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