サクラエディタで編集中に、Git Repositoryとの差分を比較する。
Git側の設定で、winMergeで差分比較をできるように、difftoolを設定が必要
reference
(function(){
//
// git diffで、difftoolを指定して起動する
function doProcess(){
var cmd_statement = "git windiff ";
Editor.ExecCommand(cmd_statement, 0);
}
// -------------- entry point
if(typeof(Editor) !== 'undefined'){
Editor.FileSave();
doProcess();
} else {
if(typeof(WScript) !== 'undefined'){
WScript.Echo('[Warn] This script is for sakura macro. A env is maybe wsh.')
} else {
console.log('[Warn] This script is for sakura macro. A env is maybe node.')
}
}
}())
(function(){
//
// gitでdiffで編集中のファイルを比較
function doProcess(){
var target_ = Editor.ExpandParameter('$F');
var cmd_statement = "git windiff " + target_;
Editor.ExecCommand(cmd_statement, 1);
}
// -------------- entry point
if(typeof(Editor) !== 'undefined'){
Editor.FileSave();
doProcess();
} else {
if(typeof(WScript) !== 'undefined'){
WScript.Echo('[Warn] This script is for sakura macro. A env is maybe wsh.')
} else {
console.log('[Warn] This script is for sakura macro. A env is maybe node.')
}
}
}())