Sublime 利用 SideBarEnhancements 插件 實現用快捷鍵打開文件

這個神器上手好幾天了,誰叫我是折騰黨。下了SideBarEnhancements插件後,可以實現Chrome打開網頁快捷鍵,今天要寫VBS腳本,就想:爲什麼不能像VS一樣按F5來執行呢?於是我編寫了如下快捷方式

                       {
				"caption": "Run",
				"id": "side-bar-files-open-with-Run",

				"command": "side_bar_files_open_with",
				"args": {
									"paths": [],
									"application": "C:\\Windows\\System32\\cmd.exe",
									"extensions":".*", //any file with extension
									"args":[]
						},
				"open_automatically" : false // will close the view/tab and launch the application
			},

這不難題來了,cmd.exe竟然無效,我要一般打開文件都是右鍵選擇打開,不知道要調用哪個程序啊。上網搜尋無果後,又繼續折騰,換成了explorer.exe,竟然可以執行了!


接下來就把快捷鍵設置成F5就OK啦


首選項-案件綁定-用戶 添加如下代碼就可以了


    { "keys": ["f5"], "command": "side_bar_files_open_with",
            "args": {
                "paths": [],
                "application": "C:\\Windows\\System32\\explorer.exe",
                "extensions":".*" //any file with extension
            } 
     } 


現在按F5,就可以執行VBS程序啦,是不是很方便呢!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章