vim

James Amberger 2024-11-18T14:00:09.850049Z

Anybody good at vimscript want to help me with a vim-fireplace pr for an EvalAtMark command?

Nundrum 2024-11-18T20:48:06.725229Z

I hate to say it, but Conjure has that built in. I've found Neovim + Conjure much easier to deal with than the tools I was using before.

James Amberger 2024-11-19T00:15:36.246549Z

Conjure is cool and it’s actually made me much more willing to use Python when it helps me get along with others. I still prefer Fireplace though.

James Amberger 2024-11-19T11:32:07.599709Z

I have a working command! for this:

command! -nargs=1 EvalMark :call fireplace#eval({'code': getline(getpos("'".<f-args>)[1])})
but it doesn’t echo the result of the eval and may lack other affordances.

James Amberger 2024-11-19T11:33:46.968299Z

Oh and it chokes on multiline forms 🙃

Nundrum 2024-11-19T18:04:31.216559Z

I think that fireplace.vim is using searchpairpos to match the parens

Nundrum 2024-11-19T18:05:31.936439Z

and uses printop to echo back the results

Nundrum 2024-11-19T18:06:15.536449Z

I wonder if it might be easier to work in a case for marks at function! fireplace#eval(...) abort

James Amberger 2024-11-19T21:13:50.344409Z

quite possibly. and I don’t know how to turn that into a normal-mode map either

James Amberger 2024-11-19T21:14:21.586629Z

like c'a or something to eval at 'a

James Amberger 2024-11-19T21:14:51.072889Z

(a consequence of not knowing vimscript)

Nundrum 2024-11-19T21:41:09.867339Z

You can see the other bindings in fireplace here: https://github.com/tpope/vim-fireplace/blob/master/autoload/fireplace.vim#L1860

Daniel Slutsky 2024-11-18T18:12:02.323409Z

https://clojurians.slack.com/archives/C02V9TL2G3V/p1731953343094829

👀 1
1