adampresley / sublime-view-in-browser

Open the contents of your current view/tab in a web browser
MIT License
271 stars 67 forks source link

Environment option on key binding to check same file on different url #47

Open vikaskanani opened 9 years ago

vikaskanani commented 9 years ago

It would be a feature request!!

If we can set an environment option it would be nice!

Lets say I have two servers, so there will be two base url.

So Project settings would look like:

"settings": {
        "sublime-view-in-browser": {
            "default" : {
                "baseUrl": "http://myproject.local",
                "basePath": "C:\\DATA\\workspace\\myproject"
            },
            "production": {
                "baseUrl": "http://myproject.com",
                "basePath": "C:\\DATA\\workspace\\myproject"
            }
        }
    }

Now, our keyboard shortcuts should be able to pass environment in arguments:

{ "keys": ["f12"], "command": "view_in_browser" }, //Default setting
{ "keys": ["ctrl+f12" ], "command": "view_in_browser", "args": { "browser": "firefox", "environment" : "production" } } //production setting