I am having some difficulty setting a simple keybinding in Sublime Text 2, which I have only been using for a few hours.
I managed to install Markdown Preview and learned how to invoke it on a simple markdown text file. My next desire was to set a simple key binding to bring up the browser preview without having to go through the Command Palette, which I find a bit cumbersome.
The instructions at the above link are fairly clear, and I managed to modify my User Settings as directed, so that they look like this:
// Settings in here override those in "Default/Preferences.sublime-settings", and
// are overridden in turn by file type specific settings.
{
"keys": ["alt+m"],
"command": "markdown_preview",
"args":
{
"target": "browser"
}
}
For some reason, however, ALT-m is not bringing up the preview. Instead, the greek letter mu gets inserted into my text file.
I assumed this is because of some peculiarity involving the Option key on a Mac, so I experimented with trying to bind it to another key like "f7", but that doesn't seem to work either.
Can anybody think of any gotchas involving keybindings for Sublime Text 2 on MacOS X that I might be overlooking?
User keybindings are defined in the .sublime-keymap
file, I think you are in the .sublime-settings file
. Just put it in the right file and it should work. I'm on Windows, so I'm not sure if it's identical for Mac, but I can access the file from the Preferences menu (Key Bindings - User).