How to use Jedit as the external editor of 7zip

感情迁移 提交于 2019-12-12 02:49:33

问题


I am trying to use Jedit as an external editor to 7zip.

7zip opens Jedit as external editor however edits are only saved back if Jedit was not running previously. I probably should pass -noserver or -newview command line arguments to Jedit as an external editor, but when I do that 7zip gives an error: 'Cannot start editor'.

How could I use Jedit as an external editor to 7zip so that edits are saved back?


回答1:


You cannot give arguments to the programs you configure in 7-Zip.

What you need to do is to create a batch file that you call from 7-Zip that sets the options you want to have and that forwards all other arguments.

What you do NOT want to do is to use the -noserver option without a -settings option if a jEdit instance is already running. Currently jEdit does not behave nice if you start two really separated instances in the same settings directory, as the first that writes a specific settings file after the second instance is started "owns" it and the other just does not save it anymore, so your positions, recent files, changed settings etc. will not be persisted and there is no prominent warning about this.

What you DO want to do is to use the -wait option, that is present for exactly those cases.

So create a file jedit-wait.bat (e. g. in the jEdit installation directory) with content @jedit -wait %* and then configure that batch file as 7-Zip editor. That is also how I have set it up and it works exactly like expected. The only slightly unnice thing is, that you will have a black command line window sitting there as long as you edit the file, but that is not as disturbing as it sounds, at least to me.



来源:https://stackoverflow.com/questions/34921965/how-to-use-jedit-as-the-external-editor-of-7zip

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!