0

I wanted to bind hotkey in Sublime Text 2 like this:

[
    {"keys": ["ctrl+alt+m"], "command": "toggle_menu"}
]

After I tried to use it, but nothing happend. Later I realised that I don't have 'toggle_menu' option at all. In ctrl+shift+p menu there is no view: Toggle Menu and in the View tab either. enter image description here Tell me how to add the 'toggle_menu' action, please help!

Hombre Honrado
  • 65
  • 1
  • 2
  • 5
  • Are you using Ubuntu? I didn't know if there is an option like that in Sublime Text 2, but I'm using Sublime Text 3 and there is a file ~/.config/sublime-text-3/Local/Session.sublime_session which has "menu_visible" key that has to be true if you want to see menu bar. You can also read this answer for more information: http://stackoverflow.com/a/27232998/2474573 – Deniz Kaplan Sep 17 '16 at 19:51
  • Thanks, but I already read this answer. My problem is not in showing Menu, you can see in screenshot that Menu is visible, problem is to toggle it by hotkey. – Hombre Honrado Sep 17 '16 at 20:01
  • There is no issue with this in [Sublime Text 3](https://sublimetext.com/3). I strongly recommend you upgrade. – MattDMo Sep 17 '16 at 20:58

1 Answers1

0

Sublime Text 2 has no ability to hide and show the menu, so there is no menu entry, command palette entry or command to toggle the state of the menu. This is also something that's outside the purview of any plugin. The page that told you about that particular command was mentioning Sublime 3 functionality.

As a result, if you want to add the toggle_menu command, you need to be using Sublime Text 3 and not Sublime Text 2. Sublime 3 includes this ability using that exact command, so what you've tried to do will work just fine there.

OdatNurd
  • 21,371
  • 3
  • 50
  • 68