Sublime Forum

Can't get a simple HTML build system to work

#1

I’m trying to fix Sublime Text so that when I hit F7 it simply opens the file in the default web browser. This operation works fine from the command line but gets screwed up by Sublime Text somehow.

What I did: Created and saved a new build system with the following contents:

{ "cmd": "start", "$file"] }

Easy peasy right? Not so fast. Every time I run it on an HTML file, ST throws up the following error:

[Error 2] The system cannot find the file specified [cmd: [u'start', u'D:\\Users\\bleepuser\\Documents\\code\\testhtml.html']] [dir: D:\Users\bleepuser\Documents\code] [path: bleeeeeeeeeeeeeeeeeeeeeeeeeep] [Finished]

Can anyone tell me why this isn’t working?

Edit: Pathing directly to a browser works fine, just not “start”? Weird…

0 Likes

#2

I’m not sure, but try use${file}

0 Likes

#3

What is ‘start’? I must be missing something :exclamation: :question:

{ "cmd": "C:\\Users\\Andrew\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe", "$file"] }

0 Likes