Sublime Forum

Comprehensive Key Bindings List

#1

Hi,

I was trying to find out how to bind a key to the File: Move command, and couldn’t find it in the list anywhere… and I couldn’t figure out how to bind it… I tried a bunch of different ways of saying “move_file” in the user keybindings file. This prompted the question: what other commands don’t have bindings listed in the bindings file? I’m sure there are plenty, because the command list is huge… and it doesn’t exactly represent the commands as they are formatted/named in the key bindings file. Confused!

Thanks.

0 Likes

#2

You can enter sublime.log_commands(True) in the console to see everything that Sublime is doing. There isn’t a complete list of commands at the moment.

1 Like

#3

Nice, thank you. I found out that the command for move is actually “side_bar_move” and the command for rename is “side_bar_rename”. I’ve now bound move to a shortcut (it functions as both move and rename anyway). Woot!

0 Likes

#4

That post was over a year ago - is there a list anywhere yet? I’m loving ST2 (it’s the closest thing to Zap on RISC OS that I’ve found yet) but there’s a whole pile of stuff I want to do with ST2 but without a list of commands (or any source code) I’m stumped. :frowning:

0 Likes

#5

Because ST2 and now ST3 development is quite fast, the default keybindings (Preferences > Key Bindings (Default)) are considered standard “reading” for getting up to speed with Sublime. You should also look at the menus in Packages/Default. And probably the macros that are in there as well :smile:

Hope this helps,
Alex

0 Likes

#6

You may want to take a look at the FindKeyConficts plugin. I added a command a while back to list all of the commands bound in a key map file. The benefit of this plugin is it will show all of the key bindings, across all of your installed packages. Of course, if you just want the default ones, looking at the default key bindings works well too. :smile:

1 Like

#7

The only problem with the suggestions above, and they are useful, is that the config files you refer to are by no means exhaustive lists. Nor do they give any explanation of the command’s purpose or parameters (aside from that immediately determined from their context). I’d already looked through these but it’s no hope when you’re trying to figure out “how can I possibly do X” where X is something that doesn’t immediately appear to be supported. There may be commands somewhere which will get you close, but it’s not immediately obvious.

For example, I can’t find a clear_selection call. I assume there must be one because any of the navigation commands will cause it to be cleared if shift isn’t held down. I assume they don’t all contain the same cut-n-paste code for clearing a selection and there’s some common code within the sources somewhere. I admit in the current implementation, this example doesn’t make a great deal of sense but it does illustrate the problem of there being no complete list (or no published programmatic method for deriving one for any given version of ST).

0 Likes

#8

I have a fresh copy of ST2 and I look at the default (Windows) key bindings. ctrl-shift-p is supposed to bring up the command palette, but it does nothing. Is there some bug?

0 Likes

#9

For the record, I just stumbled across this http://docs.sublimetext.info/en/latest/reference/commands.html which is certainly a good start.

0 Likes

#10

More likely something else on your system is grabbing the key presses for it’s own use so ST2 is not receiving the command.

Do you have anything else installed that uses that key chord for another purpose?

0 Likes