Sublime Forum

List of all available commands / 'Close others'-command

#1

I’m able to do a ‘reveal in side bar’ with my keyboard by adding this to my keymap file:

{ "keys": "super+shift+r"], "command": "reveal_in_side_bar"}

Now I want to add a keymap for the ‘Close others’ menu item (close all windows, except the active one)
How can I do this? close_others doesn’t seem to work. Which command should I use?

Or is there a complete list with all the available commands to map?
sublimetext.com/docs/commands doesn’t seem complete! (reveal_in_side_bar can not be found there for example)

0 Likes

#2

In the console, you can run:

sublime.log_commands(True)

And then when you do things in Sublime it will show you what the command was in the console.

For your particular case, unfortunately the close_others_by_index command requires arguments, so it’s not just a simple case of binding that command. Looks like someone wrote a simple plugin to do what you want:

1 Like

#3

Thank you for answering both of my questions!
It’s working perfectly using the script in the other topic.

0 Likes

#4

Thanks from me too!

I needed to discover what command sets tab width. It resulted to these lines in my keymap:

{ "keys": "super+alt+t", "2"], "command": "set_setting", "args": {"setting": "tab_size", "value": 2} },
{ "keys": "super+alt+t", "4"], "command": "set_setting", "args": {"setting": "tab_size", "value": 4} }

]

0 Likes

#5

I have created a complete list of Sublime Text 3 commands that doesn’t have a default shortcut.
Have a look at it here: http://codezag.com/list-sublime-text-3-commands/
Hope it helps.

1 Like