功能提供[tab]键乳胶功能

发布于 2025-02-07 02:33:42 字数 184 浏览 3 评论 0 原文

在Julia repl中,如果我想键入α字符,我要做的是: \ alpha [tab] 返回希腊字母,我想要什么做/知道是否有一种方法可以通过以下功能模仿此行为:

tab_function(raw"\alpha") # output => 'α'

In the Julia REPL, if I want to type the α character, what I would do is: \alpha[TAB] which returns the Greek letter, what I would like to do/know if there is a way to emulate this behavior via a function like the following:

tab_function(raw"\alpha") # output => 'α'

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

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

发布评论

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

评论(1

零崎曲识 2025-02-14 02:33:42

您可以在

对于您的情况,我认为最简单的是使用 repl.replcompletions.latex_symbols dictionary :(

julia> REPL.REPLCompletions.latex_symbols[raw"\alpha"]
"α"

但是,如果您需要更奇特的东西,请检查我已链接的文件)

You can check the whole implementation of REPL completions in https://github.com/JuliaLang/julia/blob/master/stdlib/REPL/src/REPLCompletions.jl.

For your case I think that the easiest is to use REPL.REPLCompletions.latex_symbols dictionary:

julia> REPL.REPLCompletions.latex_symbols[raw"\alpha"]
"α"

(but if you need something more fancy then check the file I have linked above)

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