Sublime Forum

"url" variable in sublime-project file to open in browser

#1

Hi,

I watched this tutorial
tutsplus.com/lesson/sidebar-enhancements/

but I am not able to set up this url variable. I added an url variable to the sublime-project file using something like "url":"http://localhost:8888/" but “Open in Browser” still uses file:/// and not the locahost location. Any ideas?

Thanks!

0 Likes

SideBarEnhancements Project URL not working?
#2

outdated tutorial:

Read this github.com/titoBouzout/SideBarE … ts#f12-key

0 Likes

#3

I had the same issue and looked at the info from the above post and this is what I typed when I selected the edit projects preview urls. I’m using linux so your project path may be different.

SideBarEnhancements.json

{
   "/home/yourname/yourproject":
    {
	"url_testing":"http://localhost/yourproject/"
    }
}
0 Likes

#4

Hi, I’m a newbie of sublimetext2.

I’m looking to implement this feature on a web project I’m working.

The project contains a lot of folders, an only a subfolder rappresents document root.

For example I have:

project - folder1
            - public_html

On the sidebar I’ve tried configuring this way:

{
    "/projectsDir/myproject/public_html":{
        "url_testing":"http://myproject"
    }
}

or 

{
    "/projectsDir/myproject":{
        "url_testing":"http://myproject"
    }
}

But when I press F12 the browser loads this url:

myproject/public_html/index.php

There’s a way to fix it?

Thank you

0 Likes