Is there a way to define keyword bindings for each project?

I am currently defining shortcuts for build options in my global configuration. Is there a way to do the same, but using the <my-project>.sublime-project configuration file?

I tried to define them inside the "settings" field - it did not work:

 "settings": [ { "keys": ["ctrl+shift+a"], "command": "build", "args": {"variant": "my_variant"} } ] 
+7
sublimetext2
source share
1 answer

I don’t think there is a way to define keyboard layouts outside of .sublime-keymap files that AFAIK needs to be stored in the Packages hierarchy, for example, in Packages/User/Default (<your OS>).sublime-keymap Sublime Packages/User/Default (<your OS>).sublime-keymap , since Sublime ignores files with key cards with other names.

However, there is a workaround for what you are trying to do. The .sublime-project file supports the "build_systems" parameter:

 "build_systems": [ { "name": "List", "cmd": ["ls"] } ] 

Accordingly, by modifying this for each project, you can turn on the Automatic build system and execute your specific launch when you press Ctrl B. More information on assembly systems is available here .

+3
source share

All Articles