Build Lisp code in SublimeText2

我的未来我决定 提交于 2019-12-05 02:19:14

问题


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


回答1:


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"]
    // }
}



回答2:


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:


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.



来源:https://stackoverflow.com/questions/10197787/build-lisp-code-in-sublimetext2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!