hook global NormalKey y|d|c %{ nop %sh{
printf %s “$kak_main_reg_dquote” | xsel --input --clipboard
}}
map global user P ‘!xsel --output --clipboard’
map global user p ‘<a-!>xsel --output --clipboard’
And I installed xsel
I try to copy / paste with other applications.
Sometimes the yank is working sometimes not.
And I never saw the paste working.
I succeed to do paste generally with ctrl+shift+v of the terminal (in insert mode).
It is worsth with cygwin(xsel is installed too).
I can paste with shift+insert (in insert mode) but I can not yank by any shortcuts I know.
Is there a way to be sure and to make it working fine ?
Certainly I do something wrong.
Do you have the same in kakrc ?
I guess I just have to use ‘y’ to yank and ‘p’ or ´P’ to paste.
I wouldn’t expect xsel to work under cygwin, since xsel is very specific to the X11 display server which most people don’t run under Windows (although I think cygwin provides it as an option).
As I understand it, cygwin allows you to interact with the Windows clipboard by reading from or writing to the file /dev/clipboard, so you might want to customise your kakrc on cygwin to do that, or have a command that decides how to interact with the clipboard based on the output of a command like uname.
The vis-clipboard helper from the “vis” editor is a good example to follow.
Thanks I found a work-around : To copy from outside of cygwin to kakoune : Put kakoune in insert mode and S-Insert to paste To copy from kakoune to outside : In kakoune, C+b [, select what you need and do C-Insert