Sublime Forum

How to set file type with key binding

#1

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:

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

any ideas? I’m using ST2 build 2085

0 Likes

#2

Take a look at this post :wink:

0 Likes

#3

Arguments need to be passed via the “args” key:

{ "keys": "ctrl+shift+h"], "command": "set_file_type", "args": {"syntax:" "Packages/HTML/HTML.tmLanguage" } }
0 Likes