Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Sublime Text is very customizable, with all the shortcut options in one text file for you to edit. By default, a number of them do not work, mainly because the Alt key escapes the program in Unity.

I would like to change it so that it works well with Ubuntu, but I thought I'd check if one exists already that someone has made. A quick Google didn't find any.

Thanks

share|improve this question
    
As it is not part of Ubuntu, you probably should ask on sublimetext.com/support or on their forum. Also, Ubuntu forums at ubuntuforms.org would probably be a better place to discuss this, than Ask Ubuntu is. –  dobey Mar 29 '13 at 21:32
1  
@dobey Why would this question not be fit here? The FAQ clearly states: We welcome questions about: Running third-party applications on Ubuntu. –  Seth Mar 29 '13 at 21:34

1 Answer 1

Most of the settings and modifications that can be made to Sublime are done via JSON files, and this is true for key bindings. Key bindings are usually OS-specific, which means that three key bindings files will need to be created for your plugin. The files should be named Default (Windows).sublime-keymap, Default (Linux).sublime-keymap and Default (OSX).sublime-keymap. Prefixr/
...
- Default (Linux).sublime-keymap
- Default (OSX).sublime-keymap
- Default (Windows).sublime-keymap
- Prefixr.py
The .sublime-keymap files contain a JSON array that contains JSON objects to specify the key bindings. The JSON objects must contain a keys and command key, and may also contain a args key if the command requires arguments. The hardest part about picking a key binding is to ensure the key binding is not already used. This can be done by going to the Preferences > Key Bindings – Default menu entry and searching for the keybinding you wish to use. Once you’ve found a suitably unused binding, add it to your .sublime-keymap files. view plaincopy to clipboardprint? [
{
"keys": ["ctrl+alt+x"], "command": "prefixr"
}
]
Normally the Linux and Windows key bindings are the same. The cmd key on OS Xis specified by the string super in the .sublime-keymap files. When porting a key binding across OSes, it is common for the ctrl key onWindows and Linux to be swapped out for super on OS X. This may not, however, always be the most natural hand movement, so if possible try and test your keybindings out on a real keyboard.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.