Skip to content
swannodette edited this page Mar 29, 2012 · 1 revision

Install Sublime Text 2, install Sublime Text Package Control, use that to install the SublimeREPL package, and finally, install Leiningen 1.7.

From the Sublime Text 2 menu, Preferences > Browse Packages. You'll be taken to the Packages folder, open SublimeREPL/config/Clojure/Main.sublime-menu. Add a new command that looks like this:

{"command": "repl_open", 
 "caption": "ClojureScript",
 "id": "repl_clojurescript",
 "args": {
    "type": "subprocess",
    "encoding": "utf8",
    "cmd": {"windows": ["lein.bat", "repl"],
            "linux": ["lein", "repl"],
            "osx":  ["lein", "trampoline", "cljsbuild", "repl-listen"]},
    "soft_quit": "\n(. System exit 0)\n",
    "cwd": {"windows":"c:/Clojure", // where the lein.bat lives!
            "linux": "$file_path",
            "osx": "$file_path"},
    "syntax": "Packages/Clojure/Clojure.tmLanguage",
    "external_id": "clojure",
    "extend_env": {"INSIDE_EMACS": "1"}
    }
}
Clone this wiki locally