Home Download Buy Blog Forum Support

Sublime Text 2 Open in Browser

Re: Sublime Text 2 Open in Browser

Postby Varemenos on Sat Mar 17, 2012 3:39 pm

Code: Select all
import sublime, sublime_plugin
import subprocess

class OpenBrowserCommand(sublime_plugin.TextCommand):
   def run(self,edit):
      subprocess.call([r'C:\Program Files (x86)\Mozilla Firefox\firefox.exe', '-new-tab', self.view.file_name()])

Im using this code mentioned previous, but it will open the file in the browser with file:/// is there a way to change it to http://localhost/?
Posts: 5
Joined: Sat Mar 17, 2012 3:37 pm


Return to Technical Support

Who is online

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