在sublime text中结合SideBarEnhancements插件用文件浏览器打开某个目录

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

SideBarEnhancements插件地址:https://github.com/titoBouzout/SideBarEnhancements。

在windows下,在sidebar后右击一目录,选择Open in browser,会用文件浏览器打开该目录,个人觉得这个功能相当使用。然而当我在linux mint使用时,却不起作用了。

其实,可以通过open with来实现。具体过程如下:

1、在st的侧边栏中右击一目录,依次选择Open With->Edit Applications,st会打开一Side Bar.sublime-menu的文件。 2、假如使用thunar这个文件管理器,可以在打开的配置文件中加入以下内容: { "caption": "Thunar", "id": "side-bar-files-open-with-thunar",

			"command": "side_bar_files_open_with",
			"args": {
								"paths": [],
								"application": "thunar", // 
								"extensions":""  
							},
			"open_automatically" : false // will close the view/tab and launch the application
		},

最终文件内容如下:

[
{"id": "side-bar-files-open-with",
	"children":
	[

		//application 1
		{
			"caption": "Thunar",
			"id": "side-bar-files-open-with-thunar",

			"command": "side_bar_files_open_with",
			"args": {
								"paths": [],
								"application": "thunar", // 
								"extensions":""  
							},
			"open_automatically" : false // will close the view/tab and launch the application
		},

		//separator
		{"caption":"-"},

		//application 2
		{
			"caption": "Gedit",
			"id": "side-bar-files-open-with-gedit",

			"command": "side_bar_files_open_with",
			"args": {
								"paths": [],
								"application": "gedit", // 
								"extensions":".*"  
							},
			"open_automatically" : false // will close the view/tab and launch the application
		},

		//separator
		{"caption":"-"},

		//application n
		{
			"caption": "Chrome",
			"id": "side-bar-files-open-with-chrome",

			"command": "side_bar_files_open_with",
			"args": {
								"paths": [],
								"application": "google-chrome",
								"extensions":".*" //any file with extension
					},
			"open_automatically" : false // will close the view/tab and launch the application
		},

		{"caption":"-"}
	]
}
]

效果如下: 在sublime text中结合SideBarEnhancements插件用文件浏览器打开某个目录_第1张图片

除了thunar,Krusader也不错。但是linux mint自带的nemo文件浏览器却无法实现,这也许和nemo的实现机制有关。

转载于:https://my.oschina.net/letiantian/blog/311467

你可能感兴趣的:(在sublime text中结合SideBarEnhancements插件用文件浏览器打开某个目录)