This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Hey there. What is the recommended way of dealing with a huge repl output file in Calva? I think I used to run the "Clear REPL History"
command as mentioned in the docs here https://calva.io/output/, but that command isn't available to me anymore for some reason (latest Calva, latest VS Code). Any pointers?
> the "Clear REPL History"
command as mentioned in the docs
It’s still there. Maybe your repl isn’t connected? (For some reason this command only activates with a connected repl). Anyway, it doesn’t deal with the repl output, only the history function (`alt+up`).
As for dealing with huge output... Select all and delete is what I do in lack of a clear output command. For actually working with huge output I think #C0185BFLLSE is the way to go.
I nuked the file manually, and I've disconnected and jacked in several times since then, but I suspect you're right that I must have been disconnected, because the command appears to me now! Sorry for the pebkac, and yeah portal is definitely awesome for navigating bigger structures 😄 Also, happy new years from Norway, Peter! 🎉
The repl output is kept in a file, somewhere under .calva
. You can truncate -s 0
that file anytime from a terminal and Calva's output window will instantly be empty!
Yeah. The repl output is a file, actually. Only with some special attention from Calva when editing it.
A super-duper notebooking arrangement, actually. But I have a habit of eval'ing from other buffers using the "eval...insert result as comment" command, and the repl-output buffer gets slow when it gets too big, so I truncate often!
We’re (or @U9A1RLFNV, really) planning to do an experiment going back to a Webview for the repl window. Maybe we should remember that keeping a log is also nice so keeping some support for that if we leave the “plain file” path.
It might be nice to have an option for automatically shrinking the REPL output file so that it only keeps a certain number of lines or results or something...
Good idea ^ - a "truncate at x lines" (or x height) type of option. We should try to avoid truncating in the middle of forms, though. Maybe a number of forms truncation value would be good - not sure yet.
Hey all - just curious if there’s a way in VS Code to not have output.calva-repl show up in the search results? I’ve tried adding it to search excludes and file excludes but it still shows up in search because I believe it’s the open window. I’m hacking on another extension and it seems like there’s an API called https://vshaxe.github.io/vscode-extern/vscode/TextDocumentContentProvider.html that supports this but haven’t used it yet.
The Calva output window is read/write though, so don’t think the TextDocumentContentProvider is an option? But I haven’t looked deeply at it so I may have it wrong.
sorry - good point, yes the buffer isn’t editable