首页 > 技术文章 > 在 Sublime Text 3 中快捷打开 git-gui

liaozt 2016-11-02 12:07 原文

在文件夹右键菜单上可以方便的打开 git-gui,在 st 里面也可以添加这个右键菜单。

步骤如下:

  • 安装 SideBarEnhancements 插件。
  • 在 SideBarEnhancements 任意文件夹右键菜单上选择 Open With > Edit Applications...,编辑 Side Bar.sublime-menu 配置文件,在 children 数组里面添加如下成员:
//git-gui
{
    "caption": "Git-Gui",
    "id": "side-bar-dir-open-with-git-gui",
    "command": "side_bar_files_open_with",
    "args": {
        "paths": [],
        "application": "D:/Program Files/Git/cmd/git-gui.exe", // 这里改成你自己的路径
        "extensions":"",
        "args":["--working-dir"]
    },
    "open_automatically" : false 
}
//git-bash
{
	"caption": "Git-Bash",
	"id": "side-bar-dir-open-with-git-bash",

	"command": "side_bar_files_open_with",
	"args": {
						"paths": [],
						"application": "D:/Program Files/Putty/gitbash.bat",
						"extensions":"",
						"args":[]
					},
	"open_automatically" : false
}


// gitbash.bat 内容如下
"D:/Program Files/Git/git-bash.exe" --cd=%1

参考

推荐阅读