windows git gui右键sublime/vs code打开当前文件编辑

git安装目录\Git\libexec\git-core\git-gui.tcl的 proc create_common_diff_popup 下追加:

$ctxm add command \
        -label [mc "Open With Sublime"] \
        -command {eval exec {"sublime安装目录/Sublime Text 2/sublime_text.exe"} $current_diff_path &}
    $ctxm add command \
        -label [mc "Copy Current Path"] \
        -command {
            clipboard clear
            clipboard append \
                -format STRING \
                -type STRING \
                -- $current_diff_path
        }
    lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]

  

替换红色标记的目录即可

Vs Code同理,将Sublime路径替换为Vs Code安装路径即可

posted on 2015-07-17 12:36  坚壳  阅读(316)  评论(0编辑  收藏  举报