Home Download Buy Blog Forum Support

Keybindings for syntax

Keybindings for syntax

Postby ergon on Sat Mar 31, 2012 5:14 am

I can't find a good reference to the list of commands that can be used in keybindings. I'd like to bind C++ syntax to a key or have an easy way to set the syntax. Or is the recommended method to immediately save new files with an appropriate extension?
ergon
 
Posts: 2
Joined: Sat Mar 31, 2012 5:08 am

Re: Keybindings for syntax

Postby jps on Sat Mar 31, 2012 6:43 am

You can make a key binding for this (there are other threads with details IIRC), but the simplest keyboard driven way is to use the Command Palette (via the Tools menu), and type in the syntax you'd like to apply.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Keybindings for syntax

Postby ergon on Sat Mar 31, 2012 11:38 am

I managed to get this to work in the interactive console, now trying to figure out how to map it to a key. Sorry if this is too basic, I've had the editor 2 days now.

view.set_syntax_file('Packages/C++/C++.tmLanguage')
ergon
 
Posts: 2
Joined: Sat Mar 31, 2012 5:08 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 12 guests