[quote=“C0D312”]Well, if you are looking to open javascript in your web browser, your best bet would be to save the javascript in an html file and surround it in tags. Then go to Tools > New Plugin. Paste this into the new plugin file: [code]import sublime, sublime_plugin
import webbrowser
class OpenBrowserCommand(sublime_plugin.TextCommand):
def run(self,edit):
url = self.view.file_name()
webbrowser.open_new(url)[/code]
Save the file as openinbrowser.py (it really doesn’t matter what you name it though).
Then go to “Preferences > Key Bindings - User”, and add the following: { "keys": "ctrl+shift+b"], "command": "open_browser" }
Now when you are working on the javascript, you can press “control + shift + b” to open the file in your browser.
Hope that helps![/quote]
This is a brilliant solution.
After playing around though I would also like the option of executing the build with node. I have tried to add versions to the build system but they have not worked. How could I execute with node? Was reading this http://www.sublimetext.com/docs/build
so I tried a few different versions of
build "node" "$File"
but couldn’t get it to go.
PS How do I remove bad build systems I have created?