Show/Hide Tools Panel via Hot Key
-
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?
-
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).
-
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.
-
If I understand it correctly, then the PythonScript plugin and two scripts should do what you want
notepad.hideToolBar(True)
notepad.hideToolBar(False)
-
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
-
@Ekopalypse said in Show/Hide Tools Panel via Hot Key:
notepad.hideToolBar
Whoops. I forgot that command already existed for PythonScript.
-
@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.