Build Lisp code in SublimeText2

2020-06-23 07:24发布

Any way to build&run common lisp in ST2 on mac os? I know about SLIME and Emacs, but i'm interested in ST

3条回答
Lonely孤独者°
2楼-- · 2020-06-23 08:12

On windows, I was able to use the REPL by combining GNU Common Lisp and the package SublimeREPL.

Now, I don't know if it's possible on OSX, but I would be really surprised if it wasn't.

You'll have to add Lisp REPL to SublimeREPL, because it doesn't provide it by default, but it's pretty easy to configure anyway.

查看更多
闹够了就滚
3楼-- · 2020-06-23 08:19

First you have to install interpreter, in my case I used sbcl.

After installing that it's prety simple. On ST2 go to Preferences/Browse Packages, go to Lisp, add a new file Lisp.sublime-settings with:

{
    "cmd": ["sbcl", "--script", "$file"],
    "working_dir": "${project_path:${folder}}",
    "selector": "source.lisp",
    "osx":
    {
        "cmd": ["/opt/local/bin/sbcl", "--script", "$file"]
    },
    // exemple in windows with CLISP
    "windows":
    {
        "cmd": ["clisp", "$file"]
    }
    // exemple in windows with SBCL
    // "windows":
    // {
    //  "cmd": ["sbcl", "--script", "$file"]
    // }
}
查看更多
孤傲高冷的网名
4楼-- · 2020-06-23 08:19

By the way, if you want to program in Lisp on Mac you can also try using Clozure CL with its development environment:

http://ccl.clozure.com/manual/chapter5.1.html#ccl-ide-introduction

I did not use it yet, but probably it is worth having a chance.

查看更多
登录 后发表回答