Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Editor SciTE中的Multiline command.go 短处_Editor_Go_Configure_Scite - Fatal编程技术网

Editor SciTE中的Multiline command.go 短处

Editor SciTE中的Multiline command.go 短处,editor,go,configure,scite,Editor,Go,Configure,Scite,这涉及Windows(特别是Windows 7)中的SciTE和go语言。这是我第一次使用SciTE,所以如果有其他方法来实现我的目标,也可以 目标:只需一键,即可编译、链接和执行新创建的二进制文件 长长的 我想在SciTE中的“go”命令下设置compile/link/excecute。这可能会有点让人困惑,因为它也是针对。以下是我到目前为止的情况: command.compile.*.go=8g $(FileNameExt) command.build.*.go=8l -o $(FileNa

这涉及Windows(特别是Windows 7)中的SciTE和go语言。这是我第一次使用SciTE,所以如果有其他方法来实现我的目标,也可以

目标:只需一键,即可编译、链接和执行新创建的二进制文件

长长的 我想在SciTE中的“go”命令下设置compile/link/excecute。这可能会有点让人困惑,因为它也是针对。以下是我到目前为止的情况:

command.compile.*.go=8g $(FileNameExt)
command.build.*.go=8l -o $(FileName).exe $(FileName).8
command.go.*.go=$(FileName).exe
我想要的是:

command.go.*.go=\
8g $(FileNamExt)\
8l -o $(FileName).exe $(FileName).8\
$(FileName).exe
如果这是我想要的方式,它将编译文件,链接它,然后运行可执行文件。发生的情况是:

8g hello.go8l -o hello.exe hello.8hello.exe
何时应该:

8g hello.go
8l -o hello.exe hello.8
hello.exe

执行每一行的地方。

行继续转义没有空格,这就是为什么看起来像这样

我不知道Windows,但在unix shell中,您可以用分号分隔多个命令(或彼得索提到的
&
,在这里更合适)


您仍然可以包装,但要意识到它不会考虑语法意义上的包装,因此适当地添加分隔字符。

编写一个批处理脚本,类似于:

@echo off
if (%1 == "") (goto end)

set gofile=%1%
shift

8g %gofile%.go
8l -o %gofile%.exe %gofile%.8
%gofile%.exe

:end
批处理文件可以在任何地方,但假设它位于没有引号的“C:\one\two\three\GO.bat”中。在SciTE属性文件更改中:

command.go.*.go=$(FileName).exe


当您点击F5或单击“Go”时,它将编译、链接并执行文件。

在windows中,我发现相当于分号的是双符号。然而,西特似乎打得不好。因此,虽然“8g%gofile%.go&&8l-o%gofile%.exe%gofile%.8&&%gofile%.exe”不带引号,但引号在批处理文件或命令行中有效,而在SciTE中则不然。
command.go.*.go=C:\one\two\three\GO.bat $(FileName)