3 ms·
The org-mode reference is "rhetoric". That's the Latin for "#thatsthejoke" :) Regarding the REPL - what I mean is, run a snippet that executes in the context o
by to3m 9y ago
The org-mode reference is "rhetoric". That's the Latin for "#thatsthejoke" :)
Regarding the REPL - what I mean is, run a snippet that executes in the context of the editor. Like, in emacs, you can execute ``(defun fred () (interactive) (insert "fred"))'' from the scratch buffer, and now you've got a new editor command: fred. Run it with M-x (the closest Emacs analogue to the Command Palette). Bind it to a key, maybe: ``(global-set-key (kbd "<f6>") 'fred)''. Good for prototyping, debugging addons, or just writing quick one-off things.
And as for Git, I don't really understand the suggestion. I have a Git repo for Emacs settings that works on all my PCs: Linux, OS X (terminal), OS X (GUI), Windows (non-work), Windows (work). If there's anything that needs to be different on one or the other, I just do ``(when (tom--is-osx) ...stuff...)'' or whatever. tom--is-osx is a function that's something like ``(defun tom--is-osx () (eq system-type 'darwin))'', and so on for the other systems I use. I check for my work PC by examining the hostname.
For VSCode, on the other hand, there's only one settings.json (and it's right out of the way, in some fiddly folder structure that's laid out like there's no real user-serviceable parts inside, which gives me pause - but that's a separate issue). In my case, most of it wants to be the same on every system. Some bits want to be different. I'd also like my plugins list to be synced as well. Doesn't seem to be any good support for that either.
(This stuff is easy to do with Emacs, because Emacs doesn't have a settings file per se, just a file with Lisp commands in it that, when run, leave the system in the desired state. So you can have ifs, along with anything else you like, because it's just code.)
- ZenoArrow 9y ago> "The org-mode reference is "rhetoric". That's the Latin for "#thatsthejoke" :)" I got what you were doing with it (suggesting it in a jokey way as if it wouldn't be fair to even bring it up), I was just using it as an opening to discuss alternative org-mode implementations. Emacs may have the canonical one, but it's not like it's impossible to implement elsewhere. > "Regarding the REPL - what I mean is, run a snippet that executes in the context of the editor" Is that not covered by the Code Runner extension I suggested earlier? > "And as for Git, I don't really understand the suggestion." Multiple Git repos, each one covering different system settings. In other words, if you work across two PCs, one Git repo for PC 1, another Git repo for PC 2. Alternatively, you could organise it in the same repo under different branches. If you know Git you'll know what I'm suggesting is trivially easy.
- to3m 9y agoThe Code Runner looks like it just runs a script and puts the output in a VSCode panel, which is not the same thing. VSCode is written in something that compiles to Javascript, right? So, while you're running VSCode, there's a JS VM that's running the VSCode code. So what I'm missing is a way to be able to run your own code inside the same VM that the editor's code is running in, giving it full access to all the objects and state that the editor's code is in. You can use this to write ad-hoc extensions that disappear when you quit, or just experiment with the extension functionality. This is typically how you start and then iterate on extensions in Emacs.