I started a few weeks ago to use the fantastic SuperCollider mode for Emacs (with Doom Emacs). I’m using SC mostly for live-coding using ProxySpace and Pbinds. Used in parallel with yasnippet, I can quickly summon pre-cooked functions and utilities.
Still, I never found a way to replicate the “code block” eval functionality found in the vanilla ScIDE : surrounding a piece of code with parenthesis -> eval. I’m currently evaluating code by painfully selecting an area of text and pressing
C-c C-c (eval region-or-line). Apart from being really slow, this method is also pushing the cursor to the end of the evaluated block, which is really not that good for quick live-coding edits.
Is it a problem with Doom-Emacs or have I overlooked something in the SECL documentation? I can see the
C-c C-d (sclang-eval-region) keybind but it feels like it fails at selecting any kind of text region.
More generally speaking, what is your workflow to take the best out of this Emacs mode?
EDIT: I found a workaround to my problem using Vim macros. It works for continuous blocks of text without any empty empty middle line. All there is to do is to register a small macro.
- register a keyboard macro using the following command:
:qa vap C-c C-c q.
- the macro is stored in
@ato summon it. Replace
awith any desired letter from a-z in the preceding command if you wish to.
The only problem is that you cannot have any white line in the Pbinds or SynthDefs you write.