I am using JEdit with the JDiff plugin for file compares. Now I would like to open the JDiff plugin from another tool using command line parameters. Is this possible? So far I was only able to open the 2 files i want to compare in JEdit.
This almost works..... I just can't get the macro to execute after the other files are loaded...
Put this macro in a file.
view.splitVertically();
editPane.prevBuffer();
jdiff.DualDiff.toggleFor(view);
If you on Linux or Mac, put it in ~/.jedit/macros/split_wins_and_jdiff.bsh
. If you're on Windows, put it someplace... ( c:/split_wins_and_jdiff.bsh
maybe?)
Then run:
java -jar jedit.jar -noserver -norestore \
-run=$HOME/.jedit/macros/split_wins_and_jdiff.bsh\
file_on_left file_on_right
The problem is, I can't get the macro to run after initialization, so that method results in an error. If you're ok with doing a two step process, then you could do:
Setup
~/.jedit/macros
for linux, mac)How to Use
Whenever you want to quickly jdiff two files: * Open the two files:
java -jar jedit.jar -noserver -norestore file_on_left file_on_right
Without Macros
Btw, you can do all this without the macro, if you create a shortcut for JDiff ( for me it is ctrl+shift+d, d)
Open the two files:
java -jar jedit.jar -noserver -norestore file_on_left file_on_right
Split the screens vertically
ctrl+3
On the right screen ( which is now selected after the split), cycle to the other buffer with ctrl+page-up.
Turn on JDiff with your shortcut ( for me ctrl+shift+d, d)
Creating macros in jedit is dead simple. You can simply record them and they'll popup in a new buffer where you can view the actual macro code. This is what I did to create the macro. Try exploring the macro menu and macro usage.