[CM] snd/vim integration

Kenneth Flak kennethflak at protonmail.com
Tue Jul 13 01:52:59 PDT 2021


Hi all,

I have found a very promising plugin for communicating between neovim and snd (only neovim, unfortunately, as it relies heavily on the lua api): https://github.com/Olical/conjure
The way I have set it up using packer is with this configuration:
```
         use {
             'Olical/conjure',
             config = function()
                 vim.g["conjure#client#scheme#stdio#command"] = "snd"
                 vim.g["conjure#client#scheme#stdio#prompt_pattern"] = ">"
             end
         }
```

If I now open a .scm file, an instance of snd is spawned, and I can send it commands directly from the nvim buffer by f.x. positioning the cursor over the sexpr I want to evaluate and hit <localleader>ee.

There seems to be some sort of auto-completion support, but I haven't had time to dig into this yet.

Best,
Kenneth

--
Roosna & Flak - Contemporary Dance & Music
Web: roosnaflak.com
Code: {github,gitlab}.com/kflak
Mastodon: @kf at sonomu.club
On  7 Jul 2021  08:25, Iain Duncan wrote:
>I'm certainly interested to hear what you come up with too, my solution was
>just the low hanging fruit I knew I could get working easily. Main thing that
>might be useful from mine is just the mapping to get a visual selection off to
>a command line script. That script could be anything that hoovers up buffer
>contents over stdin.
>
>iain
>
>On Wed, Jul 7, 2021 at 8:21 AM Kenneth Flak <kennethflak at protonmail.com> wrote:
>
>    Thanks both!
>
>    I'll take a look at this once I finish a residency here in Tallinn next
>    week. Very useful information. Haven't really done much in c, and I prefer
>    to keep my vim python-free, but both of these angles should give me plenty
>    of inspiration!
>
>    Best,
>    Kenneth
>
>    --
>    Roosna & Flak - Contemporary Dance & Music
>    Web: roosnaflak.com
>    Code: {github,gitlab}.com/kflak
>    Mastodon: @kf at sonomu.club
>    On  7 Jul 2021  08:08, Iain Duncan wrote:
>    >Not sure if it's useful, but I can tell you how I wound up making my Vim
>    to
>    >Scheme-for-Max workflow:
>    >
>    >- vim key mappings exist to visually select the current matching
>    parenthetical
>    >expression and send it to a Python script as stdin
>    >- Python script sends to Max over OSC using liblo 
>    >
>    >The details are here: https://github.com/iainctduncan/
>    scheme-for-max-cookbook/
>    >blob/master/editor-integration/README.md
>    >
>    >
>    >On Wed, Jul 7, 2021 at 7:22 AM <bil at ccrma.stanford.edu> wrote:
>    >
>    >    I don't know of any prior work on that.  snd-kbd.c has
>    >    the keyboard mappings.  There's an array "built-in-keys"
>    >    and a function "keyboard_command".  The latter is
>    >    a set of case statements -- it should be reasonably
>    >    obvious how it works.  I don't know anything about vim.
>    >    If you get something working, please let me know --
>    >    I'd be happy to merge it into my version.
>    >
>    >    _______________________________________________
>    >    Cmdist mailing list
>    >    Cmdist at ccrma.stanford.edu
>    >    https://cm-mail.stanford.edu/mailman/listinfo/cmdist
>    >
>
>
>    _______________________________________________
>    Cmdist mailing list
>    Cmdist at ccrma.stanford.edu
>    https://cm-mail.stanford.edu/mailman/listinfo/cmdist
>




More information about the Cmdist mailing list