38

Is there a comprehensive list of keyboard shortcuts for use in Sublime Text 2?

I'm specifically looking for shortcuts that grant me the functionality of the arrow keys, the Home, Delete (NOT Backspace) and End keys without moving my hands off of the home row...

5 Answers 5

30

I should have dug more before I asked this... They are called "Key Bindings" and every single one of them is configurable from within a text file. Click "Preferences" > "Default Key Bindings" to view them. Copy and paste the ones you want to edit into "Preferences" > "User Key Bindings" to and change to your hearts content.

Here is the documentation.

My problem was that I was searching for "keyboard shortcuts" instead of "Key Bindings". Whoops...

To specifically address the question I had, about how to replicate the Delete, Home, End and Arrow keys, I have modified my "User Key Bindings" file to look like the following:

[
    { "keys": ["shift+backspace"], "command": "right_delete" },
    { "keys": ["ctrl+backspace"], "command": "right_delete" },

    { "keys": ["ctrl+j"], "command": "move", "args": {"by": "characters", "forward": false} },
    { "keys": ["ctrl+l"], "command": "move", "args": {"by": "characters", "forward": true} },
    { "keys": ["ctrl+i"], "command": "move", "args": {"by": "lines", "forward": false} },
    { "keys": ["ctrl+k"], "command": "move", "args": {"by": "lines", "forward": true} },
    { "keys": ["ctrl+shift+j"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} },
    { "keys": ["ctrl+shift+l"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} },
    { "keys": ["ctrl+shift+i"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
    { "keys": ["ctrl+shift+k"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },

    { "keys": ["ctrl+alt+j"], "command": "move", "args": {"by": "words", "forward": false} },
    { "keys": ["ctrl+alt+l"], "command": "move", "args": {"by": "word_ends", "forward": true} },
    { "keys": ["ctrl+shift+alt+j"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
    { "keys": ["ctrl+shift+alt+l"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} },

    { "keys": ["ctrl+,"], "command": "move_to", "args": {"to": "bol", "extend": false} },
    { "keys": ["ctrl+."], "command": "move_to", "args": {"to": "eol", "extend": false} },
    { "keys": ["ctrl+shift+,"], "command": "move_to", "args": {"to": "bol", "extend": true} },
    { "keys": ["ctrl+shift+."], "command": "move_to", "args": {"to": "eol", "extend": true} }
]
1
12

I created a single page cheat sheet with the default keybindings for Windows:

Sublime Cheat Sheet

Link to Github version of PDF for futureproofing

You can also check out this post on my personal blog which additionally provides a quick explanation of the different possible commands.

0
4

You may not have heard of it but there is an app that shows you all the shortcuts of any app on your mac (this includes sublime text 2). You can find it at http://www.grandtotal.biz/CheatSheet/

Standard usage: just hold the command button while the app is running.

0
2

Here's the one I am using: http://www.cheatography.com/njovin/cheat-sheets/sublime-text-2-keyboard-shortcuts-windows/

The site lets you narrow down by typing a few words describing the action or the keys.

0

I use the Package Keymaps which lets you search Key Bindings via the Command Palette.


From the Readme:

Features

  • NEW! Search for keymaps by function
  • Shows searchable color-coded Cheat Sheet (overview) of keymaps
  • Open the keymap file to edit chosen keymap

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .