Mathematica 中的自动补全括号
不久前我开始学习 Mathematica - 也就是说我是新手。通常我在带有自动结束括号的文本编辑器中编写代码,例如 Gedit、Notepad++、Qt IDE 等。 当您无需监视括号时,这非常方便。 但我在 Mathematica 中寻找类似功能的尝试并未成功。我不敢相信如此强大的工具没有如此简单的东西。有谁知道如何自动完成括号?
Not a long ago I started to learn Mathematica - i.e. I'm novice. Usually I code in text editors with auto close of brackets like Gedit,Notepad++,Qt IDE etc.
It's very convenient when you are not obliged to watch over brackets.
But my attempts to find similar functionality in Mathematica weren't successful. I can't believe that such a powerful tool doesn't have such simple thing. Does anyone know how to autocomplete brackets?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试以下操作:
请注意,只有在左括号后键入一个字符后,才会进行替换。如果您喜欢这个结果,您可以在全球范围内更广泛地应用它。
You could experiment with something like:
Note that the replacement doesn't happen until you type a character after the opening bracket. If you like the result you can then apply this more globally.
作为替代方案,Alt+] 将生成 [] 并将插入点移动到 [] 内。
As an alternative, Alt+] will produce [] and move the insertion point inside the [].
版本 13 中引入了括号自动完成功能:
https://writings.stephenwolfram.com/2021/12/launching-version-13-0-of-wolfram-language-mathematica/
https://reference.wolfram.com/language/workflow/EnterPairedDelimiters.html
Auto-completion of brackets has been introduced in version 13:
https://writings.stephenwolfram.com/2021/12/launching-version-13-0-of-wolfram-language-mathematica/
https://reference.wolfram.com/language/workflow/EnterPairedDelimiters.html