sublime 安装view in browser插件后,点击的view in browser没反应的解决办法

打开 sublime text 3211

preferences --> package setting --> view in browser --> settings-users
在这里插入图片描述

将下面这个代码复制到settings-users,关闭保存即可。

以下代码是设置了chrome浏览器的默认打开方式,这样就可以通过点击view in browser正常打开chrome进行预览了。

{
	"posix": {
		"linux": {
			"firefox": "firefox -new-tab",
			"chrome": "google-chrome",
			"chrome64": "google-chrome",
			"chromium": "chromium"
		},
		"linux2": {
			"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\"",
			"yandex": "open -a \"/Applications/Yandex.app\""
		}
	},
	"nt": {
		"win32": {
			"firefox": "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe -new-tab",
			"iexplore": "C:\\Program Files\\Internet Explorer\\iexplore.exe",
			"chrome": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
			"chrome64": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
			"yandex": "%Local AppData%\\Yandex\\YandexBrowser\\browser.exe"
		}
	},
 
	"browser": "chrome"
}

一定要注意你的浏览器的安装路径!!!!!!!!!!!!!

路径要匹配上!!!!!!!

不然会依旧没有反应!!!!!!!!!!!

下面两个图是以我的谷歌浏览器的路径为例:
在这里插入图片描述
在这里插入图片描述

Logo

更多推荐