Sublime Text, SublimeREPL, Clojure, and Windows 8

I have both Leiningen and Clojure running on Windows 8 separately from Sublime Text (for example, I can get a replica running on Windows PowerShell).

My problem is that I cannot get SublimeREPL to work in SublimeText (REPL loads, but does nothing). Are there any simple traps that may be missing, or if it is not, are there a series of steps that I could follow to troubleshoot?

+7
windows-8 clojure sublimetext3 sublimerepl
source share
2 answers

Please see this SublimeREPL issue for instructions on how I got REPL for Clojure, at least on XP (I haven’t tried it on Win7 or another 8). Basically, I edited the menu file for Clojure and changed the command from lein repl to lein trampoline run -m clojure.main , which for some reason did the trick. I also changed the path to $file so that you can open the REPL while your project.clj is the current tab in Sublime and the REPL should inherit the project settings.

For reference, the full Packages/User/SublimeREPL/config/Clojure/Main.sublime-menu file ( Packages available through Preferences -> Browse Packages... ) looks like this:

 [ { "id": "tools", "children": [{ "caption": "SublimeREPL", "mnemonic": "r", "id": "SublimeREPL", "children": [ {"caption": "Clojure", "id": "Clojure", "children":[ {"command": "repl_open", "caption": "Clojure Trampoline", "id": "repl_clojure", "args": { "type": "subprocess", "encoding": "utf8", "cmd": {"windows": ["lein.bat", "trampoline", "run", "-m", "clojure.main"], "linux": ["lein", "repl"], "osx": ["lein", "repl"]}, "soft_quit": "\n(. System exit 0)\n", "cwd": {"windows":"$file_path", "linux": "$file_path", "osx": "$file_path"}, "syntax": "Packages/Clojure/Clojure.tmLanguage", "external_id": "clojure", "extend_env": {"INSIDE_EMACS": "1"} } }, {"command": "clojure_auto_telnet_repl", "id": "repl_clojure_telnet", "caption": "Clojure-Telnet"}]} ] }] } ] 
+7
source share

I solved this problem using Git Bash Shell. I used a shell script version of leiningen instead of lein.bat

This is the command I use:

 ["C:\\Program Files\\Git\\bin\\sh.exe", "-l", "--", "/d/lein.sh", "repl"] 

Assuming lein.sh is in d: \

Team

lein trampoline sometimes behaves differently than a replica of the lane, and may fail for unknown reasons.

+1
source share

All Articles