Sublime Text 2 keyboard shortcut to open file in s

2019-01-09 23:09发布

I do web development and am trying out Sublime Text 2. Is there a keyboard shortcut to open the current file in specified browser (e.g. Chrome)?

Any help to get setup in Sublime Text for web development is appreciated!

14条回答
放荡不羁爱自由
2楼-- · 2019-01-09 23:41

On windows launching default browser with a predefined url:

Tools > Build System > New Build System:

{
    "cmd": ["cmd","/K","start http://localhost/projects/Reminder/"]
}

ctrl + B and voila!

查看更多
小情绪 Triste *
3楼-- · 2019-01-09 23:42

You can install SideBarEnhancements plugin, which among other things will give you ability to open file in browser just by clicking F12.

To open exactly in Chrome, you will need to fix up “Side Bar.sublime-settings” file and set "default_browser" to be "chrome".

I also recommend to learn this video tutorial on Sublime Text 2.

查看更多
登录 后发表回答