本文介绍了如何将Jedit用作7zip的外部编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Jedit用作7zip的外部编辑器。

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

7zip将Jedit作为外部编辑器打开,但是仅在以前未运行Jedit的情况下才保存编辑。我可能应该将-noserver或-newview命令行参数传递给Jedit作为外部编辑器,但是当我这样做时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'.

我如何使用Jedit作为7zip的外部编辑器,以便将编辑保存回去?

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

推荐答案

您不能为在7-Zip中配置的程序提供参数。

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

您需要做的是创建一个批处理文件通过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.

您要做的是如果jEdit实例已在运行,则使用不带-settings选项的-noserver选项。当前,如果您在同一设置目录中启动两个真正分开的实例,则jEdit的表现不佳,因为第一个在第二个实例启动后写入特定设置文件的实例拥有该实例,而另一个实例不再保存它,因此您的职位,最近的文件,更改的设置等将不会保留,也没有对此的突出警告。

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.

要做的事情想要做的事情就是使用-wait选项,该选项正是针对这些情况的。

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

因此,请创建一个包含内容的文件jedit-wait.bat(例如,在jEdit安装目录中) @jedit -wait%* ,然后将该批处理文件配置为7-Zip编辑器。这也是我设置的方式,它的工作原理与预期的完全一样。唯一略微棘手的事情是,只要您编辑文件,就会有一个黑色的命令行窗口坐在那里,但这至少听起来并不令人担忧。

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.

这篇关于如何将Jedit用作7zip的外部编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 22:46