Community
    • Login

    Show/Hide Tools Panel via Hot Key

    Scheduled Pinned Locked Moved General Discussion
    7 Posts 5 Posters 1.6k 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.
    • kuzduk = kuzdukK
      kuzduk = kuzduk
      last edited by

      Unfortunately, I didn’t find a hot key for Show/Hide toolbars. It would be nice if this function existed! Maybe there are some plugins to solve this problem?

      PeterJonesP EkopalypseE 2 Replies Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @kuzduk = kuzduk
        last edited by

        @kuzduk-kuzduk ,

        The builtin toolbar is displayed or hidden using the Settings > Preferences > General > Toolbar > Hide checkbox.

        The items in the Preferences dialog cannot be accessed using keyboard shortcuts.

        The way Notepad++ is currently implemented, the Plugin API doesn’t give a hook to plugins to change settings, so the only way a plugin could do that would be to dive deep using esoteric win32 api commands to essentially launch the preferences and toggle that option for you. The “Customize Toolbar” plugin doesn’t have that feature, but it would seem like a natural fit, since they already hack the toolbar to add new icons – you could try a feature request for that plugin, though I don’t know how active the plugin owner (@dave-user) is.

        To get it implemented as a keyboard-accessible toggle in native Notepad++, it would require an official feature request be made (process described in our FAQ), and would require some major reworking of the way things are done (from what I understand, they would have to remove that option from the Preferences dialog, and instead use a menu command to toggle it, to give the Shortcut Mapper the ability to hook a shortcut to that toggle, though I am not an expert on the internals).

        1 Reply Last reply Reply Quote 0
        • CoisesC
          Coises
          last edited by Coises

          My guess is that AutoHotKey could manage this sort of thing (launching Preferences and toggling the correct control, as @PeterJones describes above). I don’t use it or know enough about it to propose details, but if you’re interested in learning, you might try their forums for help.

          1 Reply Last reply Reply Quote 2
          • EkopalypseE
            Ekopalypse @kuzduk = kuzduk
            last edited by

            @kuzduk-kuzduk

            If I understand it correctly, then the PythonScript plugin and two scripts should do what you want

            notepad.hideToolBar(True)
            
            notepad.hideToolBar(False)
            
            PeterJonesP 1 Reply Last reply Reply Quote 4
            • guy038G
              guy038
              last edited by guy038

              Hello, @kuzduk-kuzduk, @peterjones, @coises, @ekopalypse and All,

              Or even better :

              notepad.hideToolBar(not(notepad.isToolBarHidden()))
              

              So, you get the previous ToolBar status when running it twice !

              Best Regards,

              guy038

              kuzduk = kuzdukK 1 Reply Last reply Reply Quote 5
              • PeterJonesP
                PeterJones @Ekopalypse
                last edited by

                @Ekopalypse said in Show/Hide Tools Panel via Hot Key:

                notepad.hideToolBar

                Whoops. I forgot that command already existed for PythonScript.

                1 Reply Last reply Reply Quote 1
                • kuzduk = kuzdukK
                  kuzduk = kuzduk @guy038
                  last edited by

                  @guy038 said in Show/Hide Tools Panel via Hot Key:

                  notepad.hideToolBar(not(notepad.isToolBarHidden()))

                  Thanks! It is working via 1 hour of learning PytonScript…
                  Thanks for all who helped in current problem!

                  Many little thigs in npp can use via monstrous system of plugin, like Firefox philosophy… It is not good! Old Opera and today Vivaldy phylosophia is best: all setting work correctly from installer.

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