Community
    • Login

    How many files are opened (show number)

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    12 Posts 8 Posters 3.9k 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.
    • M FRM
      M FR
      last edited by

      Hi everybody

      How can I tell how many files I have opened? I see a lot of tabs on the top, but I can’t find any hint on showing how many I opened.

      We had an issue with this because it seemed to have opened a certain amount of files but it turned out, that some where missing. So comparing the amount of the opened ones to the number if files in a folder would be hepful.

      Thanks for help,
      Michaela

      Alan KilbornA astrosofistaA 2 Replies Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @M FR
        last edited by Alan Kilborn

        @M-FR

        If you click the Window menu and then choose Window… (at the bottom of the dropdown menu), a window will pop up that looks like this at the top that contains your desired information (and a lot of other info about your documents as well):

        eb163e83-6045-41e0-8ad6-9d019450d2e4-image.png

        Note: requires N++ 7.9.2 or later.

        BTW, anybody else think that “Window” is a bad name for this, all the way through? Wouldn’t “Tab” have been better nomenclature?

        @guy038: Beat you to it! :-)

        PeterJonesP ArkadiuszMichalskiA 2 Replies Last reply Reply Quote 2
        • guy038G
          guy038
          last edited by guy038

          Hello, @m-fr and All,

          Michaela, since the 7.9.2 release of Notepad++ a new functionality have been added :

          Point 16. Add the number of total documents on windows dialog's title bar of the change.log file


          So, to get the total number of the opened documents of the main view OR the secondary view :

          • Run the menu option Windows > Windows...

          • Hit the shortcut ALT , W , W

          In the title bar of the dialog, you’ll see the text Windows - Total documents: ##

          Best Regards,

          guy038

          1 Reply Last reply Reply Quote 2
          • PeterJonesP
            PeterJones @Alan Kilborn
            last edited by

            @Alan-Kilborn said in How many files are opened (show number):

            BTW, anybody else think that “Window” is a bad name for this, all the way through? Wouldn’t “Tab” have been better nomenclature?

            Depends on your perspective. In the Win32 API environment, “tabs” are just “windows” that are restricted within some parent window. The “Window” menu item has a long-standing Win32 application history as the location to go in any Win32 application to manipulate which files or tabs or windows are active or ordered or what have you, even though in most modern apps, “Tabs” would make more sense.

            1 Reply Last reply Reply Quote 3
            • EkopalypseE
              Ekopalypse
              last edited by

              As a user, do I even care if it’s called tab or window?
              Imho it doesn’t provide any additional information to the user.
              I would just call it total documents: X

              Alan KilbornA 1 Reply Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn @Ekopalypse
                last edited by

                @Ekopalypse

                I was referring to the Window menu.
                And then the Window… item on the Window menu.
                And then the Windows - … in the title bar of the window that pops up.

                The “total documents: X” thing is just fine, although for it to be nomenclature consistent it should be Windows - total windows: X :-)

                “window” is just a bit too generic.
                More evidence is people that talk of “multi-instance” as “I have 2 N++ windows open”.

                Of course, this whole thing I started is rather pointless, as it isn’t going to be changed.
                But if it were, a Documents menu, and using that below it, would be nice.
                But in Preferences the “tab bar” nomenclature is used, so in the end perhaps “Tab” would be best…

                BUT WHO CARES BECAUSE NOTHING WILL CHANGE? :-) And I’m not even advocating for change. :-)

                @PeterJones

                Yes, of course, history of “window” noted.

                EkopalypseE 1 Reply Last reply Reply Quote 2
                • EkopalypseE
                  Ekopalypse @Alan Kilborn
                  last edited by

                  @Alan-Kilborn said in How many files are opened (show number):

                  I was referring to the Window menu.

                  Ahh ok - misunderstanding.

                  1 Reply Last reply Reply Quote 1
                  • prahladmifourP
                    prahladmifour
                    last edited by

                    Hello,@M-FR
                    The reason is that the operating system needs memory to manage each open file, and memory is a limited resource - especially on embedded systems.

                    As a root user, you can change the maximum of the open file count per process (via ulimit -n) and per system.

                    I hope this information will be useful to you.
                    Thank you.

                    1 Reply Last reply Reply Quote -3
                    • M FRM
                      M FR
                      last edited by

                      Hi everybody

                      Thanks, that was all very interesting. The thing I’ll go for is first of all to get the newest version as I only have 7.8.6 and as @guy038 wrote, I’ll need a newer version for the thing I need.

                      Thanks to all of you, great support here for a notepadd++ newbie :-)

                      Michaela

                      ArkadiuszMichalskiA 1 Reply Last reply Reply Quote 2
                      • ArkadiuszMichalskiA
                        ArkadiuszMichalski @Alan Kilborn
                        last edited by

                        @Alan-Kilborn said in How many files are opened (show number):

                        BTW, anybody else think that “Window” is a bad name for this, all the way through? Wouldn’t “Tab” have been better nomenclature?

                        @guy038: Beat you to it! :-)

                        Yes, me, and this naming is also confusing in the window itself.
                        https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8339
                        To be more precise, it displays the tabs in the current view (not both views).

                        1 Reply Last reply Reply Quote 1
                        • ArkadiuszMichalskiA
                          ArkadiuszMichalski @M FR
                          last edited by

                          @M FR
                          You can also use some script to dispaly such info in status bar or in other form, more detail in this bug:
                          https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8338

                          1 Reply Last reply Reply Quote 1
                          • astrosofistaA
                            astrosofista @M FR
                            last edited by

                            Hi @M-FR

                            For different reasons as yours, I found this information useful to my working setup, so and though I am not a real programmer, managed anyway to write — based on countless examples buried in the forum archives — this little Python script, tested in npp7.9.1.portable.x64, which will show how many files are opened in the status bar.

                            If there is any issue with it, lets hope that the Pythoniers of the forum chime in.

                            from Npp import *
                            
                            def StatusbarFilesAddition(args):
                                Cur_Lang = notepad.getLanguageDesc(notepad.getLangType())
                                Open_Files = 0
                                for file in notepad.getFiles():
                                    Open_Files += 1
                            
                                notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, '{}   -   Open files: {}'.format(Cur_Lang, Open_Files))
                            
                            editor.callback(StatusbarFilesAddition, [SCINTILLANOTIFICATION.UPDATEUI])  # register callback
                            

                            If you want to try the script, here are some instructions to install it:

                            First off, install PythonScript using Plugins > Plugins Admin.

                            Then go to Plugins > Python Script > Scripts, Ctrl+Click on startup, and paste the script at the bottom of the file. Save and close startup.

                            Now go to Plugins > Python Script > Configuration…, and change the “Initialisation” setting from LAZY to ATSTARTUP. Exit Notepad++ and reload.

                            From now on the first section of the status bar will show how many files are opened in Notepad++ after the current language.

                            Take care and have fun!

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