Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a Vim user trying to move to Sublime Text 2, as it's faster than MacVim with a bunch of stuff open.

I have may custom keyboard shortcuts in Vim, that I would like to transfer to ST2.

How can I set up custom shortcuts? Is there an equivalent to vimrc?

I know I can do some chording shortcuts via the OS X Preferences, but they won't respect the command mode in ST2.

For example, I want to set ^w l to move the input focus one column/pane to the right, and ^w h to move to the left.

share|improve this question
up vote 14 down vote accepted

Custom key bindings: Open Preferences > Key Bindings-Default read through or search for the binding you want to change. Copy the command and then open Preferences > Key Bindings-User. Paste and edit the command.

To change the bindings for switching panes, edit these commands. Notice how keys are separated by + and the end of each line (except the last) needs a comma. I'm not sure if you can set it up so you can move to right/left panes. The way I set it up is ctrl + 1 switches to the first pane, etc.

// panes
{ "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": 2 } }

More info: http://docs.sublimetext.info/en/latest/customization/key_bindings.html

share|improve this answer

To add to @d_rail's answer,

You can create a simple (ex:f12), combination (ex: ctrl+Y) and complex (ex: ctrl+a, ctrl+b) shortcut keys as long as you know the command name of the operation.

See here to know more: Complete list of Sublime Text 3 commands

share|improve this answer

You must log in to answer this question.

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