SciTE 找不到用户定义的函数。编辑器执行“/bin/sh”由于某种原因
所以,这是我第一次尝试让我的源代码编辑更加舒适。我遵循 SciTE
脚本编写指南。
ext.lua.startup.script=$(SciteDefaultHome)/startup.lua
command.name.1.*= Programmer's Manual (selected text)
command.subsystem.1.*= 3
command.1.*=man_select
command.shortcut.1.*=F1
上面是用户属性文件。它将F1
键绑定到用户定义的Lua
函数。
问题是,在我的例子中,man_select
启动函数,SciTE
编辑器输出给了我
>man_select
/bin/sh: man_select: not found
>Exit code: 127
所以,编辑器以我的函数名称作为参数运行一个 shell 。我找不到 SciTE
日志或控制台来查看原因。
我将 man_select
定义为一个简单的 Lua 函数,不带参数:
function man_select()
local sel = editor:GetSelText()
...
end
我应该如何使我自己的 Lua
函数对 SciTE
编辑器可见?有没有办法向 SciTE
询问有关其脚本系统流程的更多信息?
So, this is my first attempt to make my source code editing more comfortable. I follow the SciTE
scripting guide.
ext.lua.startup.script=$(SciteDefaultHome)/startup.lua
command.name.1.*= Programmer's Manual (selected text)
command.subsystem.1.*= 3
command.1.*=man_select
command.shortcut.1.*=F1
Above is the user properties file. It binds F1
key to user defined Lua
function.
The problem is, that insteed of starting the function, man_select
in my case, the SciTE
editor output gives me
>man_select
/bin/sh: man_select: not found
>Exit code: 127
So, the editor runs a shell with my function name as a argument. I can't find no SciTE
logs, or console, to see what the cause is.
I define man_select
as a simple Lua function, without arguments:
function man_select()
local sel = editor:GetSelText()
...
end
What should I do to make my own Lua
functions visible to SciTE
editor? Is there a way to ask SciTE
for more information on its scripting system flow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论