简体   繁体   English

在 Octave 6.2.0 (GUI) 中使用 Notepad++ 自定义文件编辑器打开特定的 .m 文件

[英]Open specific .m file with Notepad++ custom file editor in Octave 6.2.0 (GUI)

I'm using Octave 6.2.0 with Notepad++ as the custom file editor.我使用 Octave 6.2.0 和 Notepad++ 作为自定义文件编辑器。 When I type edit myfunction from the CLI, the file opens normally, but when I type the same thing from the GUI, the last file that I had open in Notepad++ displays, as if I had opened Notepad++ by itself from Windows Explorer (I'm using Windows 10).当我从 CLI 键入edit myfunction ,文件正常打开,但是当我从 GUI 键入相同的内容时,我在 Notepad++ 中打开的最后一个文件显示,就好像我从 Windows 资源管理器中edit myfunction打开了 Notepad++(我m 使用 Windows 10)。 In the GUI, it's the same behavior as typing edit without an argument, whereas it works as expected in the CLI.在 GUI 中,它与不带参数键入edit行为相同,而在 CLI 中则按预期工作。 It seems that my GUI is ignoring the edit function input argument, and passing the argument as a string in parentheses, ie edit('myfunction') or edit('myfunction.m') didn't help.似乎我的 GUI 忽略了edit函数输入参数,并将参数作为括号中的字符串传递,即edit('myfunction')edit('myfunction.m')没有帮助。 Is there a way to change this?有没有办法改变这种情况?

When you're in the GUI octave ignores the EDITOR env variable, and uses the built-in editor.当您在 GUI 八度音程中时,忽略 EDITOR 环境变量,并使用内置编辑器。

However, in the preferences / editor dialogue of the octave gui, there is an option to specify a custom editor.但是,在八度 gui 的首选项/编辑器对话框中,有一个选项可以指定自定义编辑器。 This will probably do what you want.这可能会做你想做的。

在首选项菜单中的自定义文件编辑器规范中使用双引号中的 Notepad++ 和%f的完整路径,即

C:\\Program Files (x86)\\Notepad++\\notepad++.exe "%f"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM