How do I exit the debugger in a SublimeREPL repl? I'm not very good at guessing keystrokes, and I didn't see anything in the documentation. As an example invoked by sending the current file to the repl:
debugger invoked on a SB-INT:SIMPLE-READER-PACKAGE-ERROR in thread
#<THREAD "main thread" RUNNING {1001834103}>:
Package PPCRE does not exist.
Stream: #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {100001B513}>
Easy to fix, but not while stuck in the debugger! The error is not, I say again, not the problem. What is the problem is that I know of no way to exit the debugger and return to the top level of the repl. Of course, this applies to any error in the repl. For instance, the following code in the file window will suffice:
(count-matches "\\w*" "foo bar baz")
This code submitted to the reply with the keystroke(s) of C-,f will, of course, enter the debugger either because you have not Quickloaded the cl-ppcre library or you have, and it's failing because you forgot to prefix your usage with ppcre: As I said, any error will do, trapping you in a repl state that is useless without a way out.
I installed the sbcl v2.3.3 MacPorts port on my Mac (OSX 10.15.7) for the purposes of this answer.
First, I created a file
test.lispwith the contents:as suggested in the question. Next, I started a REPL by selecting
Tools → SublimeREPL → Common Lisp → SBCL. This appeared in a new tab:Switching back to
test.lisp, I selectedTools → SublimeREPL → Eval in REPL → Fileand got this:I then typed in 4 and the prompt changed back to
*.If I started a fresh SBCL REPL and instead chose
Tools → SublimeREPL → Transfer to REPL → File, it copied the contents of the file to the*prompt, and I had to hit Enter for it to evaluate. The same debugger message as above came up, and entering4successfully brought me back to the*prompt.While searching for
lispon Package Control, I came acrossSlyblime, a port of Sly to Sublime Text 4 (make sure you are using build number 4000 or greater -Sublime Text → About Sublime Texton Mac,Preferences → About Sublime Texton Windows/Linux). Slyblime is built on top of SublimeREPL and adds additional features. I don't know enough about Lisp to make use of it or judge its utility, I just thought I'd mention it here.