SourceTree has a window called unstaged files where it shows files whose changes have not been committed. I want to right click on the file name & open it in an external editor. So I added a custom action -> Edit -> pathtoeditor\editor.exe $REPO\$FILE.
This launches the editor. But SourceTree also keeps showing a progress bar. The progress bar closes only after I close the external editor.
How do I avoid this? After opening the file in the external editor, I want SourceTree's UI to return to its normal state without waiting for the editor to exit.
1 Answers
Answers 1
Make a .bat file, say..."launchNotepad.bat" like so
@call pathtoEditor\editor %1
Make the batch file your script target, and your parameters stay as $REPO\$FILE. This'll make launching the editor your action, rather than the editor itself.
This has a few other advantages, like SourceTree picking up on updates to the batch file without having to restart it.
0 comments:
Post a Comment