hyh1048576

在 sublime text 里面设置 New Build System

  •  
  •   hyh1048576 · Aug 17, 2012 · 6241 views
    This topic created in 5050 days ago, the information mentioned may be changed or developed.
    自带的 build 不是无所不能的, 查了一下,要新增 build system, 可以如下设置,这里以 SBCL (common lisp 之一) 为例。

    Tools ---> Build 选取 New Build System, 贴入以下内容:

    {
    "cmd": ["sbcl", "--load", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "path": "/usr/local/bin/"
    }

    简单讲就是

    第一行的 cmd 是准备在 build 的时候执行的一行 shell command, 这里是

    sbcl --load "[当前文件]"

    第二行照着写就是了。
    第三行的 path, 要指向有第一行那个 shell command 的目录。
    2 replies    1970-01-01 08:00:00 +08:00
    rse43
        1
    rse43  
       Aug 17, 2012
    "第二行照着写就是了。"

    file_regex是用来匹配build error行,两个括号内分别捕获文件名和行号,不同的语言匹配的regex应该不同,不是照着写就行了。
    hyh1048576
        2
    hyh1048576  
    OP
       Aug 17, 2012
    @rse43 Oops, 多谢指教。今天误打误撞搞对了,决定发出来。看来班门弄斧也是有好处的,呵呵。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2718 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 15:43 · PVG 23:43 · LAX 08:43 · JFK 11:43
    ♥ Do have faith in what you're doing.