Home Download Buy Blog Forum Support

Preview in browser

Preview in browser

Postby wattsin on Fri Dec 30, 2011 3:13 pm

https://github.com/wattsin/Sublime-Text---Open-And-View

I created this simple plugin for myself, but I think others might find it useful.

Upon execution it will scan the top 10 lines of the current file for an identifier. I have it setup something like this:

//LOCATION: /controllerName/

It will scan the top for "//LOCATION:". Once it finds this it will grab the /controllerName/ and append it to the URL defined in the plugin.

So in my case it will open up my browser and go to http://localhost:8888/controllerName/

The reason I've added the location tag to the top of every page is because when your using frameworks or ajax type applications. The file doesn't necessary relate directly to the page it's supposed to be viewed on.

I've only been using Sublime Text for a few days now, it's really awesome so far...

This is also the first thing I've wrote in Python, so don't hate.

Hope this helps someone

Happy New Year,
Derek
wattsin
 
Posts: 1
Joined: Fri Dec 30, 2011 3:07 pm

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 3 guests