首页 > 代码库 > sublime view_in_browser

sublime view_in_browser

今天安装了sublime的插件view in browser,发现ctrl+alt+V用不了,在preferences看了view in browser的配置,发现browser不是我电脑上的默认浏览器,我默认的是chrome64

最搞笑的是这个默认的配置文件还是不能更改的

{    "posix": {        "linux": {            "firefox": "firefox -new-tab",            "chrome": "google-chrome",            "chrome64": "google-chrome",            "chromium": "chromium"        },        "darwin": {            "firefox": "open -a \"/Applications/Firefox.app\"",            "safari": "open -a \"/Applications/Safari.app\"",            "chrome": "open -a \"/Applications/Google Chrome.app\"",            "chrome64": "open -a \"/Applications/Google Chrome.app\""        }    },    "nt": {        "win32": {            "firefox": "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe -new-tab",            "iexplore": "C:\\Program Files\\Internet Explorer\\iexplore.exe",            "chrome": "%Local AppData%\\Google\\Chrome\\Application\\chrome.exe",            "chrome64": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"        }    },    "browser": "firefox"}

 

解决方案:在setting-user里面新建自己的配置,把最后一行改成自己默认的浏览器就ok了(如果不知道那个是自己的默认浏览器,一个个试试就ok了)

问题二:默认的快捷键是:ctrl+alt+V,想改成其他的怎么办

解决方案:在preferences的键绑定-用户下面新建自己的快捷键即可

[    { "keys": ["ctrl+shift+enter"], "command": "open_in_browser" }]

 

在[]中间加入

{ "keys": ["ctrl+shift+enter"], "command": "open_in_browser" }

就ok了,没有的[]的话,自己加上就ok了

 

sublime view_in_browser