Home Download Buy Blog Forum Support

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

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

Postby gregor.hoch on Wed Sep 26, 2012 4:15 pm

Hi,

I watched this tutorial
https://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
Code: Select all
"url":"http://localhost:8888/"
but "Open in Browser" still uses
Code: Select all
file:///
and not the locahost location. Any ideas?

Thanks!
gregor.hoch
 
Posts: 144
Joined: Sat Oct 01, 2011 7:54 pm

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

Postby tito on Thu Sep 27, 2012 10:18 pm

Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 854
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

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

Postby dcritchlow on Mon Oct 01, 2012 3:04 am

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
Code: Select all
{
   "/home/yourname/yourproject":
    {
   "url_testing":"http://localhost/yourproject/"
    }
}
dcritchlow
 
Posts: 1
Joined: Mon Oct 01, 2012 2:57 am

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

Postby gianiaz on Thu Dec 27, 2012 7:35 am

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:

Code: Select all
project - folder1
            - public_html


On the sidebar I've tried configuring this way:

Code: Select all
{
    "/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:

http://myproject/public_html/index.php

There's a way to fix it?

Thank you
gianiaz
 
Posts: 6
Joined: Thu Dec 27, 2012 7:31 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 21 guests