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