Home Download Buy Blog Forum Support

how to set file type with key binding

how to set file type with key binding

Postby blissofbeing on Fri Jul 22, 2011 4:45 pm

I'm trying to map ctrl+shift+h to set the file type of the current open window to HTML. I put this in my .sublime-keymap file and it doesn't work:

Code: Select all
{ "keys": ["ctrl+shift+h"], "command": "set_file_type Packages/HTML/HTML.tmLanguage" }


any ideas? I'm using ST2 build 2085
blissofbeing
 
Posts: 6
Joined: Fri Jul 22, 2011 4:43 pm

Re: how to set file type with key binding

Postby iamntz on Fri Jul 22, 2011 5:22 pm

Take a look at this post ;)
iamntz
 
Posts: 915
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: how to set file type with key binding

Postby jps on Sat Jul 23, 2011 1:03 am

Arguments need to be passed via the "args" key:

Code: Select all
{ "keys": ["ctrl+shift+h"], "command": "set_file_type", "args": {"syntax:" "Packages/HTML/HTML.tmLanguage" } }
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests