如何在 MATLAB 编辑器中启用自动单词完成功能?

发布于 2024-09-09 04:06:48 字数 87 浏览 3 评论 0原文

我可以通过按 Tab 在 MATLAB 命令提示符下使用自动单词完成功能,但在使用 m 文件的编辑器时无法执行此操作。有什么方法可以在编辑器中使用制表符补全吗?

I can use auto word completion at the MATLAB command prompt by pressing tab, but I can not do that while using the Editor for an m file. Is there any way to use tab completion in the Editor?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

看海 2024-09-16 04:06:48

根据 这篇 MathWorks 博客文章,制表符补全在编辑器中的工作方式与在 MATLAB R2010a 命令行窗口中的工作方式相同,但您可能必须在键盘首选项菜单中将其打开。

对于较旧的 MATLAB 版本,编辑器中的制表符补全仅适用于已在工作区中创建的函数名称和变量。因此,如果您正在编写带有变量 foobar 的脚本,并且该变量尚未在工作区(即命令行窗口)中创建,则 foobar 将不会在编辑器中使用制表符补全时显示。我在 MATLAB 7.8.0 (R2009a) 中测试时就是这种情况。

According to this MathWorks blog post, tab completion works in the Editor as it does in the Command Window for MATLAB R2010a, but you may have to turn it on in the Keyboard Preferences menu.

For older MATLAB versions, tab completion in the Editor only works for function names and variables that have already been created in the workspace. So, if you are writing a script with a variable foobar, and that variable hasn't yet been created in the workspace (i.e. Command Window), then foobar won't show up when using tab completion in the Editor. This was the case when I tested it in MATLAB 7.8.0 (R2009a).

伤感在游骋 2024-09-16 04:06:48

当您编写代码时按“TAB”键,请参阅:

在此处输入图像描述

When you are writing a code press key "TAB", see:

enter image description here

安穩 2024-09-16 04:06:48

Tab 补全适用于 Matlab 路径上的函数名称。如果变量存在于工作区中,它也适用于变量名称。因此,在编码时,最好在编写时评估命令。这使您可以立即检查错误,并使变量可用于自动完成。

Tab completion works for function names that are on Matlab's path. It also works for variable names, if the variable exists in the workspace. Thus, while you code, it may be a good idea to evaluate commands as you write. This allows you to immediately check for errors, and it makes variables available for auto-completion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文