Home Download Buy Blog Forum Support



Postby wkey on Sat Jun 04, 2011 11:51 pm

I've been using Sublime Text 2 and absolutely love it. I know it's only in Alpha and I'm really looking forward to it's release. I understand that it's missing some features and I can't figure out how to open a .htm file in my default browser. I've seen that's it works in the released version for Windows and i tried adding the following to Default (OSX).sublime-keymap
{ "keys": ["f12"], "command": "openInBrowser" }

Unfortunately that did not seem to help. I saw some references to OpeninBrowser.py and that it is supposed to be in my packages/HTML folder but it's not there. If this is simply because it does not have full python support that I will just wait patiently, but if I am just missing something and anyone point me in the correct direction I would really appreciate it. Thanks in advance!
Posts: 2
Joined: Sat Jun 04, 2011 11:23 pm

Re: OpenInBrowser

Postby pgmagallanes on Thu Jun 09, 2011 5:37 am

The answer is contained (mostly) in a previous post titled
"Sublime Text 2 Open in Browser"
Copy the last block of code from the post into a python file. Name it whatever you want but make sure it has a "py" extension and place that file in the Packages/HTML folder.
Then, in your Default (OSX).sublime-keymap file, change "openInBrowser" to "open_browser".
The documentation here
explains an important difference between version 1 and 2 of Sublime Text.
Hope this helps.
Posts: 6
Joined: Tue Mar 29, 2011 4:13 am

Re: OpenInBrowser

Postby wkey on Wed Jun 15, 2011 2:55 am

Thank you, I'll take a look at it later tonight!
Posts: 2
Joined: Sat Jun 04, 2011 11:23 pm

Return to Technical Support

Who is online

Users browsing this forum: cutmancometh, Exabot [Bot], Yahoo [Bot] and 31 guests