Hey all,
I can’t find this feature, so I’ll ask you
Is there any existing key binding to change the syntax? Or how can I create that?
Hey all,
I can’t find this feature, so I’ll ask you
Is there any existing key binding to change the syntax? Or how can I create that?
You can either use the menu (Alt+v,y,then select the syntax), or bind a key to “setFileType”, for example:
<binding key="ctrl+t" command="setFileType Packages/Python/Python.tmLanguage"/>
[quote=“jps”]You can either use the menu (Alt+v,y,then select the syntax), or bind a key to “setFileType”, for example:
<binding key="ctrl+t" command="setFileType Packages/Python/Python.tmLanguage"/>
[/quote]
Thanks, but that don’t work with Sublime Text X Alpha, version 20110106 I think?
Try adding this to your key mappings:
{ "keys": "ctrl+shift+y"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Set Syntax: "} }
The shortcut will bring up a quick panel where you can select (or type) the syntax to apply to the current view.