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

    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.

  • @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. That Window is what I want. Do you know if there is any shortcut key to open that window?

    Thank you for your reply.

  • @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.

  • @Meta-Chuh Thank you.

  • 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\)$


    • 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,


    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\)$

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

Log in to reply