Customizing Sublime Shortcuts

If you want to know how good you have become with programming, count the number of times you take your hands of the keyboard when you work :D.  Though not serious, its still true that using mouse slows down programming and on the contrary, keyboard shortcuts are the saviors of a programmers time.

Sublime provides numerous keyboard shortcuts for its users. They can be found using the following links:

They can also be found in the Key Bindings preferences file from the Preferences > Key Bindings Defaults. But, it doesn’t end here. In sublime you can easily define new shortcuts for yourself. To do so, you have to open Key Bindings User preferences file and add you new shortcuts to it.

Keybindings in Sublime are using a strong syntax that allows you to define key sequences, actions and arguments to those actions. A general keybinding in Sublime looks like the following:

The JSON keys attribute accepts an array of key sequences for the shortcut. The command attribute can be either toggle or set_setting. The former, toggles the value for a setting between false and true but, the latter sets a new value for a specific setting attribute. There are other actions types too which can be found here.

for example if you want to have to key shortcuts to switch between two themes. You can define the following key bindings in your Key Binding User file to switch between two different themes that you like most.



To read more about key bindings, take a look at this article.

1 comments On Customizing Sublime Shortcuts

Leave a reply:

Your email address will not be published.

Site Footer