在 Sublime Text 3 中快捷打開 git-gui

在文件夾右鍵菜單上能夠方便的打開 git-gui,在 st 裏面也能夠添加這個右鍵菜單。git

步驟以下:json

  • 安裝 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

參考

相關文章
相關標籤/搜索