Home Download Buy Blog Forum Support

Problems with View in Browser ( solved )

Problems with View in Browser ( solved )

Postby xMen on Wed Dec 05, 2012 11:56 am

Hello there,

first of all let me say that Sublime Text 2 is very cool stuff...
But: how difficult can it be, to view a page in a Browser as a WebSite, not as a FILE? Im working with an iMac, my favorite Browser is chrome. I´m using PHP and MySQL on localhost with XAMPP!

I´ve tried the following things:

    - PlugIn: SideBarEnhancements ( my Favorite )
    - BuiltInBrowsers
    - Plugin: View in Browser

Nothing is going to work correctly. The following snippet is from "Perfect Workflow in Sublime Text 2" from "Jeffrey Way" - but it doesn´t work.

Code: Select all
   "url" : "http://localhost",
   "folders":
   [
      {
         "path": "/Applications/XAMPP/xamppfiles/htdocs/blabla"
      }
   ]
}


So, what is the problem? Did anyone know?
Thanks for helping
Last edited by xMen on Wed Dec 05, 2012 1:07 pm, edited 2 times in total.
xMen
 
Posts: 11
Joined: Wed Dec 05, 2012 11:32 am

Re: Problems with View in Browser

Postby xMen on Wed Dec 05, 2012 1:03 pm

Hi folks,

the problem is solved. I think, the tutorial from "Jeffrey Way" belongs to an older version or whatever. I solved the problem in this way:

    1. install Package "SideBarEnhancements"
    2. right-click on a file within your project -> choose -> "PROJECT - EDIT PROJECT PREVIEW URLs"
    3. enter this code ( choose your folders... )
    Code: Select all
    {
        "/Applications/XAMPP/xamppfiles/htdocs/myWebSite":{
            "url_testing":"http://localhost/myWebSite"
        }
    }

    4. Choose from the Sublime-Menu PREFERENCES - BROWSE PACKAGES.
    5. Go to folder "SideBarEnhancements" and open the file "Default(OSX).sublime-keymap"
    6. Change the ShortCut in any way you want and be aware of "type" is "testing" or "production", depending on your entry above.
    Code: Select all
    [
       { "keys": ["f12"],
          "command": "side_bar_open_in_browser" ,
                   "args":{"paths":[], "type":"production"}
            },
       { "keys": ["super+0"],
          "command": "side_bar_open_in_browser",
          "args":{"paths":[], "type":"testing"}
       },
    ]


That´s it.
xMen
 
Posts: 11
Joined: Wed Dec 05, 2012 11:32 am

Re: Problems with View in Browser ( solved )

Postby MJ-8 on Sat Dec 08, 2012 4:52 pm

xMen...
wow, you wont even imagine how many gray hair i have got whilst trying to find a solution for this....and finally, after i followed your instructions it has worked!!! Thanks thanks again, as i love to death sublime text2, but that(unable to launch .php ext files in the browser) was driving me crazy :evil: someone should create a simple tutorial for this, since there are nothing in regards this topic. Video or some kind of simple to understand manual would be great for the community!!!

Thanks
MJ-8
 
Posts: 2
Joined: Sat Dec 08, 2012 4:46 pm

Re: Problems with View in Browser ( solved )

Postby xMen on Thu Dec 13, 2012 9:25 am

MJ-8,

believe me, I can imagine how many gray hairs you´ve got!!!

I think for those people, who record tuts every day with a tool, it is very simple to make a tutorial. But I never did before. So community, let´s make it...
xMen
 
Posts: 11
Joined: Wed Dec 05, 2012 11:32 am

Re: Problems with View in Browser ( solved )

Postby tito on Thu Dec 13, 2012 10:14 am

What's so difficult to understand of this page https://github.com/titoBouzout/SideBarE ... ts#f12-key
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 708
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Problems with View in Browser ( solved )

Postby xMen on Thu Dec 13, 2012 10:42 am

tito wrote:What's so difficult to understand of this page https://github.com/titoBouzout/SideBarE ... ts#f12-key


There is nothing difficult. This pages has solved my problem 8-)
xMen
 
Posts: 11
Joined: Wed Dec 05, 2012 11:32 am

Re: Problems with View in Browser ( solved )

Postby MJ-8 on Sun Dec 16, 2012 12:10 pm

xMen, you are right....u got the problem solved ;) thanks
MJ-8
 
Posts: 2
Joined: Sat Dec 08, 2012 4:46 pm

Re: Problems with View in Browser ( solved )

Postby stratters on Thu Feb 14, 2013 6:12 pm

Worked for me. Big thank you for helping this Apple newbie :D
stratters
 
Posts: 1
Joined: Thu Feb 14, 2013 6:04 pm

Re: Problems with View in Browser

Postby jayson21 on Mon Apr 01, 2013 4:23 pm

xMen wrote:Hi folks,

the problem is solved. I think, the tutorial from "Jeffrey Way" belongs to an older version or whatever. I solved the problem in this way:

    1. install Package "SideBarEnhancements"
    2. right-click on a file within your project -> choose -> "PROJECT - EDIT PROJECT PREVIEW URLs"
    3. enter this code ( choose your folders... )
    Code: Select all
    {
        "/Applications/XAMPP/xamppfiles/htdocs/myWebSite":{
            "url_testing":"http://localhost/myWebSite"
        }
    }

    4. Choose from the Sublime-Menu PREFERENCES - BROWSE PACKAGES.
    5. Go to folder "SideBarEnhancements" and open the file "Default(OSX).sublime-keymap"
    6. Change the ShortCut in any way you want and be aware of "type" is "testing" or "production", depending on your entry above.
    Code: Select all
    [
       { "keys": ["f12"],
          "command": "side_bar_open_in_browser" ,
                   "args":{"paths":[], "type":"production"}
            },
       { "keys": ["super+0"],
          "command": "side_bar_open_in_browser",
          "args":{"paths":[], "type":"testing"}
       },
    ]


That´s it.


This part does not work for me -> 2. right-click on a file within your project -> choose -> "PROJECT - EDIT PROJECT PREVIEW URLs"

Am supposed to right click on a file in the sidebar ? If thats so, i dont get the option project -> choose ->. Please someone explain this to me ? :)

I also get the bare code when when i want to view in browser.
jayson21
 
Posts: 2
Joined: Mon Apr 01, 2013 3:42 pm

Re: Problems with View in Browser ( solved )

Postby tito on Mon Apr 01, 2013 7:21 pm

1. install Package "SideBarEnhancements"
2. Drop a folder to the editor, or to the sidebar.
3. There should be a menuitem called project in the files context menu. IF you only see "close", then you are clicking "open files" section, not "folder section".
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 708
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Next

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 24 guests

cron