Xiang Ramadhan
Xiang Ramadhan

Reputation: 125

How do i change keybinding in sublime text 3

I want to know how to change the run key binding from ctrl+shift+b to f9 but I can't find whats the command name for it.

Upvotes: 5

Views: 8626

Answers (5)

Deepanshu Chaudhary
Deepanshu Chaudhary

Reputation: 1

Use this: { "keys": ["ctrl+enter"], "command": "build", "args": {"select": true} },

Thanks!

Upvotes: -1

J.Doe
J.Doe

Reputation: 474

The answers are correct, you just need to confirm your binding by actually executing the new binding you've made. At least that's what's worked for me so:

  1. Go to "Preferences" -> "Key Bindings"
  2. Type in the following in the right hand window.
[
    { "keys": ["f9"], "command": "build" }
]
  1. Press F9 on your keyboard to confirm.

It seems that the left side window is like it's own little console that needs to "build" the new key binding. I guess the execution adds the new key binding to the key bindings dictionary just like when you run a normal command in python. After the "script" is executed, the variable is added and can be used from now on.

Upvotes: 6

Cà phê đen
Cà phê đen

Reputation: 1951

Try this:

{ "keys": ["f9"], "command": "build", "args": {"variant": "Run"} },

Upvotes: -1

nahzor
nahzor

Reputation: 470

preferences->key bindings - user

[
    { "keys": ["f9"], "command": "build" }
]

Upvotes: 4

itsols
itsols

Reputation: 5582

On the menu, go to "Preferences" -> "Run key bindings"

A new window opens with the standard settings on the left and a custom setting on the right.

Give your new entry to override default settings.

Upvotes: 0

Related Questions