SciTE中的Multiline command.go [英] Multiline command.go in SciTE
问题描述
短
这涉及到Windows中的SciTE和go语言(特别是Windows 7)。这是我第一次使用SciTE,所以如果有另外一种方法可以实现我的目标,那就很好。
$ b
目标:按键,编译,链接和执行新创建的二进制文件。
Long
我想要设置在SciTE的go命令下的compile / link / excecute。这可能有点混乱,因为它也适用于去语言。这是我到目前为止:
command.compile。*。go = 8g $(FileNameExt)
命令.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
如果按照我的意图编译文件,然后运行可执行文件。会发生什么是:
pre $ g $ g $ 8g hello.go8l -o hello.exe hello.8hello.exe
$ c
当它应该是:
8g hello.go
8l -o hello.exe hello.8
hello.exe
解决方案编写批处理脚本,如下所示:
@echo off
if(%1 ==)(goto end)
set gofile =%1%
转换
8g%gofile%.go
8l -o%gofile%.exe%gofile%.8
%gofile%.exe
:end
批处理文件可以在任何地方,但我们假设它在'C:\一个'两个'三个'GO.bat'没有引号。在SciTE属性文件中更改:
command.go。*。go = $(FileName).exe
至
命令.go。*。go = C:\ one\two\three\GO.bat $(FileName)
当您点击F5或点击Go时,它会编译,链接并执行文件。
The Short
This deals with SciTE and the go language in Windows (in particular, Windows 7). This is my first time using SciTE, so if there is another way to achieve my goal that is fine as well.
Goal: With one key press, compile, link, and execute the newly created binary.
The Long
I want to setup the compile/link/excecute under the "go" command in SciTE. This may be slightly confusing as it is also for the go language. Here is what I have so far:
command.compile.*.go=8g $(FileNameExt) command.build.*.go=8l -o $(FileName).exe $(FileName).8 command.go.*.go=$(FileName).exe
What I would like is to have something like:
command.go.*.go=\ 8g $(FileNamExt)\ 8l -o $(FileName).exe $(FileName).8\ $(FileName).exe
If this worked the way I intended it would compile the file, link it, and then run the executable. What happens is:
8g hello.go8l -o hello.exe hello.8hello.exe
When it should be:
8g hello.go 8l -o hello.exe hello.8 hello.exe
Where each line is executed.
解决方案Write a batch script like so:
@echo off if (%1 == "") (goto end) set gofile=%1% shift 8g %gofile%.go 8l -o %gofile%.exe %gofile%.8 %gofile%.exe :end
The batch file can be anywhere, but let's say it's in 'C:\one\two\three\GO.bat' sans the quotes. In the SciTE property file change:
command.go.*.go=$(FileName).exe
to
command.go.*.go=C:\one\two\three\GO.bat $(FileName)
And when you hit F5 or click on "Go", it will compile, link, and execute the file.
这篇关于SciTE中的Multiline command.go的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!