我想将 Atom 用作 Factor 侦听器的默认编辑器,以便键入\ foo edit
将打开foo
Atom 中的定义。但是当我尝试它时,我得到了这个:
Launching failed with error:
Win32 error 0x2: The system cannot find the file specified.
Launch descriptor:
T{ process
{ command
{
"atom"
"C:\\path\\to\\factor_directory\\Factor/work/file_directory/filename.factor:1"
}
}
{ detached t }
{ environment H{ } }
{ environment-mode +append-environment+ }
{ group +same-group+ }
}
但是如果我 cd 进入目录并atom filename.factor
从 powershell 执行(我在 Windows 8.1 上),它工作正常,这表明 Factor 生成的命令有问题。于是我打开C:\path\to\factor_directory\Factor\basis\editors\atom
发现
! Copyright (C) 2014 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: editors kernel make math.parser namespaces sequences ;
IN: editors.atom
SINGLETON: atom-editor
atom-editor \ editor-class set-global
SYMBOL: atom-path
M: atom-editor editor-command ( file line -- command )
[
atom-path get "atom" or ,
number>string ":" glue ,
] { } make ;
我对这是如何工作的有最模糊的想法。我想我应该以某种方式更改 的定义editor-command
,但我不确定它有什么问题。
有任何想法吗?