Home Download Buy Blog Forum Support

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

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

Postby jozy on Tue Feb 19, 2013 10:22 pm

I'm able to do a 'reveal in side bar' with my keyboard by adding this to my keymap file:
Code: Select all
{ "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?
http://www.sublimetext.com/docs/commands doesn't seem complete! (reveal_in_side_bar can not be found there for example)
jozy
 
Posts: 2
Joined: Tue Feb 19, 2013 8:45 pm

Re: list of all available commands / 'Close others'-command

Postby sapphirehamster on Wed Feb 20, 2013 7:40 am

In the console, you can run:
Code: Select all
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:
viewtopic.php?f=2&t=5102
sapphirehamster
 
Posts: 74
Joined: Sun Jul 01, 2012 11:19 pm

Re: list of all available commands / 'Close others'-command

Postby jozy on Wed Feb 20, 2013 12:25 pm

Thank you for answering both of my questions!
It's working perfectly using the script in the other topic.
jozy
 
Posts: 2
Joined: Tue Feb 19, 2013 8:45 pm

Re: list of all available commands / 'Close others'-command

Postby noitseuq on Fri Sep 20, 2013 11:22 am

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} }
]
noitseuq
 
Posts: 2
Joined: Thu Jul 11, 2013 3:51 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron