I make a command which is sending from ranger to edit a file in kak.
Command currently is echo "eval -client client0 %%{edit %p}" | kak -p session and it works well.
Ranger’s placeholder %p contains multiple file paths separated by space, but kak’s command edit accept only one, so if i select in ranger many files and send the command to kak it opens only last.
How to improve command sending to edit all the files in %p?
As a bonus, you might be interested in tools like kakoune.cr, kakoune-remote-control, or kks, which should let you launch a terminal from within Kakoune, and then inside that terminal there will be commands that automatically connect back to the original Kakoune instance, instead of you having to hard-code client0 and session in your ranger command.
Leave if for those who uses ranger, full command is map <a-enter> shell -s printf "eval -client client0 %%%%{edit %%s\n}" %p | kak -p coding. A lot of escape symbols as you see, some of them are ranger’s ones, some printf’s.