5 ms·
I assumed the point is whether you can do this from the repl? This is something Emacs is good at, but VSCode doesn't seem to be; in Emacs, you can do something
by tom_ 5y ago
I assumed the point is whether you can do this from the repl? This is something Emacs is good at, but VSCode doesn't seem to be; in Emacs, you can do something like M-: (insert "FRED") RET and you'll see FRED appear in the current buffer. For good or (more rarely) for ill, the repl runs in the same context as the editing environment. You can use this to interactively develop extensions or just drive the editor from code as a one-off.
- oefrha 5y agoGP said “scripts”. But no, VSCode certainly doesn’t have that level of interactivity. On the other hand, the single-threadedness of Emacs is very annoying though. Edit: My usage of Emacs has been reduced to mostly just magit and dired since ~2017, so I didn’t realize Emacs 26 added threads. Is it actually widely adopted? Things I do use these days, like package.el, are clearly still blocking.
- macmac 5y agoThis is not correct. Use of the CLJS REPL to insert strings is even demonstrated in the video.
- oefrha 5y agoSorry, I wasn’t clear about it but I was talking about extension capabilities offered by stock VSCode. There’s nothing stopping third party extensions like Joyride from exposing the extension API in an REPL.
- Borkdude 5y agoThat would be possible with joyride as well. Ask for user input, then evaluate it.
- macmac 5y agoOr do it directly from the REPL.