• Login
Community
  • Login

How to set the default view

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
13 Posts 3 Posters 5.2k 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.
  • B
    Bart Terryn
    last edited by Jun 2, 2021, 11:56 AM

    I guess this is a stupid question but I have been searching a while now and could not find the answer to the following question:
    How do you set/store the default view you want?
    I would like Notepad++ to open up with the function list window and project panel 1 visible.
    Now it just start a new session with the main editing window and I do have to switch both those windows on by going through the View window

    A P 2 Replies Last reply Jun 2, 2021, 1:05 PM Reply Quote 0
    • A
      Alan Kilborn @Bart Terryn
      last edited by Jun 2, 2021, 1:05 PM

      @Bart-Terryn

      The results you obtain seem odd to me.
      If I try showing Function List and Project Panel 1, in N++ 7.9.5 or 8.0RC2, then quit N++ and restart, both of those reopen in the same locations.
      Not sure what is going on for you. :-(

      1 Reply Last reply Reply Quote 0
      • P
        PeterJones @Bart Terryn
        last edited by Jun 2, 2021, 1:11 PM

        @Bart-Terryn ,

        Notepad++ does remember the state of Function List Window, Project Panel 1, and other such features.

        Those are all stored in config.xml – whose location is often %AppData%\Notepad++\config.xml, but that depends on which config files location you have enabled (AppData, cloud, or local). If you share your ?-menu’s Debug Info, it will help give us insight into your configuration, and a screenshot of Settings > Preferences > Cloud & Link will show us whether it’s using the cloud folder.

        If your Notepad++ is not remembering the panels’ statuses, then it might be that you don’t have write-permission to your config.xml – which would be strange… but if you don’t have write permission to that file, then Notepad++ cannot save the panel status, so that could be the explanation.

        Alternately, if you have multiple instances of Notepad++ open (a separate window for each file rather than all in the same Notepad++ window with multiple tabs), then if you started instance A and instance B, where A has the panel on and B has it off, if you close A then close B, then it’s B’s state that will be saved, with no panels on… so the next time you start, there will be no panels enabled, because that’s what Notepad++ remembered.

        B 3 Replies Last reply Jun 2, 2021, 1:53 PM Reply Quote 2
        • B
          Bart Terryn @PeterJones
          last edited by Jun 2, 2021, 1:53 PM

          @PeterJones Here is the Debug info:

          Notepad++ v7.9.5   (64-bit)
          Build time : Mar 21 2021 - 02:13:17
          Path : C:\Program Files\Notepad++\notepad++.exe
          Admin mode : OFF
          Local Conf mode : OFF
          OS Name : Windows 10 Home (64-bit) 
          OS Version : 2004
          OS Build : 19041.985
          Current ANSI codepage : 1252
          Plugins : DSpellCheck.dll HexEditor.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConverter.dll NppExec.dll NppExport.dll XMLTools.dll 
          
          
          1 Reply Last reply Reply Quote 0
          • B
            Bart Terryn @PeterJones
            last edited by Jun 2, 2021, 1:54 PM

            @PeterJones and here is the screenshot your requested
            fb87236a-d6df-4f85-b60e-b975f4687e2f-image.png

            1 Reply Last reply Reply Quote 0
            • B
              Bart Terryn @PeterJones
              last edited by Jun 2, 2021, 2:01 PM

              @PeterJones I see in the debug info that the Local Conf mode = off.
              Does that mean that N++ is not using %AppData% as the folder to store the config file in?

              B P 2 Replies Last reply Jun 2, 2021, 2:06 PM Reply Quote 0
              • B
                Bart Terryn @Bart Terryn
                last edited by Jun 2, 2021, 2:06 PM

                @Bart-Terryn I do have a config file in the %AppData folder and it is writable for me
                (would be very strange if not:-)

                1 Reply Last reply Reply Quote 0
                • P
                  PeterJones @Bart Terryn
                  last edited by Jun 2, 2021, 2:14 PM

                  @Bart-Terryn said in How to set the default view:

                  @PeterJones I see in the debug info that the Local Conf mode = off.
                  Does that mean that N++ is not using %AppData% as the folder to store the config file in?

                  Actually, “Local Conf mode = off” means it is using %AppData%\Notepad++ as the config-file location. (if local config is on, it is in “portable” mode, and uses the same folder as notepad++.exe is run from)

                  I do have a config file in the %AppData folder and it is writable for me
                  (would be very strange if not:-)

                  Yes, it would be strange. But we’ve seen it happen. (Sometimes, when people log in as a separate Administrator, or have to elevate privileges but as the current user, to do the installation, then permissions don’t get set right.

                  Did you just check %AppData%, or did you also check %AppData%\Notepad++\ and the %AppData%\Notepad++\config.xml ?

                  If you believe you have write permission to that file, try closing all Notepad++, renaming it (say, keep-config.xml), and then re-start Notepad++: it should create a fresh config.xml in that folder when you exit again.

                  I ran a quick experiment: have all panels turned off, then exit Notepad++ completely. Copy config.xml to config1.xml. Then I re-ran Notepad++, turned various panels on, and exit Notepad++ completely. Copy config.xml to config2.xml. You can look at the file dates of those files – they should be a few minutes different, depending on how fast you are. If they aren’t, then you didn’t actually write the files like you thought you should. Also, run Notepad++, and open config1.xml and config2.xml side-by-side. If you have Compare Plugin, use that to compare the two; if not, you can just View > Syncrhonize Vertical Scrolling and manually compare. I would expect there to be differences in the <GUIConfig name="DockingManager" ... section, with different <PluginDlg ... /> entries, depending on which panels are in view.

                  B 2 Replies Last reply Jun 2, 2021, 3:00 PM Reply Quote 1
                  • B
                    Bart Terryn @PeterJones
                    last edited by Jun 2, 2021, 3:00 PM

                    @PeterJones Peter, let me first thank you for the time you have put into this so far.

                    Here is what I did:

                    • renamed config.xml to config-mine.xml from %AppData%\Notepad++ folder
                    • start Notepad++
                    • switched on the function list window
                    • exited Notepad++
                    • started Notepad++ again - but function list window did not show up

                    I guess the line that is important in the newly create config.xml file is the following one:
                    <PluginDlg pluginName="Notepad++::InternalFunction" id="44084" curr="1" prev="-1" isVisible="yes" />
                    But that does not to seem to be enough in order to make Notepad++ start with the function list visible (same goes for the project panel 1)

                    (if I tried to copy in the complete content of the config file, I could not submit as things got flagged down as spam)

                    P 1 Reply Last reply Jun 2, 2021, 4:20 PM Reply Quote 0
                    • B
                      Bart Terryn @PeterJones
                      last edited by Bart Terryn Jun 2, 2021, 3:06 PM Jun 2, 2021, 3:05 PM

                      @PeterJones Forgot to tell you that this used to work without a problem on my current Windows 10 Home laptop. But at some point in time (can’t remember when exactly) things stopped working correctly. And now it annoyed me enough for me to be willing to go to the bottom of this.

                      1 Reply Last reply Reply Quote 0
                      • P
                        PeterJones @Bart Terryn
                        last edited by Jun 2, 2021, 4:20 PM

                        @Bart-Terryn said in How to set the default view:

                        But that does not to seem to be enough in order to make Notepad++ start with the function list visible (same goes for the project panel 1)

                        But that is enough – or, at least, it is enough for me. I don’t understand why it’s not working for you. Literally toggling the isVisible=“yes” to “no” and back is enough for me to control whether the functionList panel is visible when I first run Notepad++ or not. If

                        None of your plugins should be getting in the way, because I have all those plugins, and it works for me.

                        What are your Settings > Preferences > Multi-Instance and Settings > Preferences > Backup settings?

                        When you are running Notepad++, are you selecting a specific session, or do you use any command line options? (I cannot wait until the v8.0 Debug Info becomes the norm, because it lists command line options and the cloud-config state as well.)

                        Experiment: Close all instances of Notepad++. Download a fresh Notepad++ portable zipfile, and unzip to a different directory where you know you have write permission (like into a folder on your Desktop). Then using that portable version (ie, double-clicking on notepad++.exe in that folder), and see whether that portable version properly remembers the panel state? Because a fresh version does for me, and if it’s some setting for you, then a fresh portable won’t have that setting.

                        B 1 Reply Last reply Jun 2, 2021, 7:39 PM Reply Quote 1
                        • B
                          Bart Terryn @PeterJones
                          last edited by Jun 2, 2021, 7:39 PM

                          @PeterJones
                          Aha I found the problem.
                          I normally start Notepad++ from an entry on the button bar of Total Commander.
                          Now this button had as parameters: -nosession %P%N.
                          I removed the -nosession setting and now Notepad++ remembers the last setting for the function list window (and others).

                          Peter it was your suggestion to install a portable version that lead me to finding this. As the portable Notepad++ did not suffer from this problem. Which then made me find out that when I double clicked on the normal Notepad++ I did not have the problem either…

                          As far as I know the -nosession setting should only prevent Notepad++ from reopening the files that you had last open.
                          But apparently it does more than just this.
                          Do you think I should open up a ticket for this?

                          Once again Peter many thanks for your help

                          P 1 Reply Last reply Jun 2, 2021, 7:53 PM Reply Quote 2
                          • P
                            PeterJones @Bart Terryn
                            last edited by Jun 2, 2021, 7:53 PM

                            @Bart-Terryn said in How to set the default view:

                            As far as I know the -nosession setting should only prevent Notepad++ from reopening the files that you had last open.
                            But apparently it does more than just this.
                            Do you think I should open up a ticket for this?

                            Download the portable v8.0-RC2 and see if it behaves the same in the newest version. If it does, then I’d say it’s at least worth reporting. If you put in a new issue , make sure to include the Debug Info for both v7.9.5 and v8.0-RC2 and say it happens in both, so that they know it’s not just a regression in v8.0.

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