How to get kakoune val/opt value from outside?

Hi,

It easy to send command to kakoune with the kak -p command.

But how can I get the content of value / option from an external script ?

I saw somewhere a snippet explaining that but I can’t find it. I think it was using something like echo -to-file

You can take a look at how @alexherbo2 implemented it in connect.kak. It brings the command :get %opt{option}.

2 Likes

Thanks @useredsa
That is exactly what I was looking for.

It could be nice if kakoune provided an API for that, write to a file just to get a value from kakoune doesn’t feel confortable

That’s issue #2118.