Closed zw963 closed 4 years ago
Thanks!
Oh, what a coincidence, I was just about to do the same stuff, thanks for contributing this! :) I've just come here when searching for an inspiration of how to write to a TemporaryFile
before passing it to WinMerge, for a change.
Some remarks for a potential discussion:
Also, but that is quite for another ticket, I think it would be great to combine the Replace in Selection command with this one, so that a user can immediately see what gets replaced. (BTW It would be also nice to have user defined replacements, similar to how the Snippets command work.)
For anyone interested, the following is possibly an ideal options set passed to the aforementioned WinMerge executable. The command's script line which passes the temporary files to the diff tool:
execute('winmergeu', '/e', '/x', '/u', '/fl', '/dl', 'item1', '/dr', 'item2', name1, name2)
/e
... close with escape/x
... only show a message dialog when items are identical and exit/u
... don't add comparison to the MRU list/fl
... put focus to the left editor (the 1st item)/dl
and /dr
... titles for the editors@pbodnar , sorry for name issue, i am not a english native speaker, can you please create a PR for fix my name issue? i think @hluk will very luck to merge your work.
Done, please check, thank you.