You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write some vimscript to allow me to instantly write the yanked buffer out to my filesystem, so that I can make more tools around it. (mainly so I can be able to slurp the yank into another instance of Vim, when on a headless machine that does not have a clipboard)
Of course, I'd like to keep vim yankstack functionality intact.
Now I also expect that yankstack itself has some code that achieves (using some black magic) the slurping of the buffer.
I've been reading the source code and I'm still a little confused.
My main limiting issue is that I need to cause the original yank behavior to proceed, in particular in visual mode, and to run some code AFTER that happens. This appears to be essentially impossible without manually reimplementing what the y key does because the contents of the yank buffer do not land until after it happens, and in an expr map I have to have the thing return (and therefore any funcs it calls) the "y" value in order for that yank to proceed.
Maybe yankstack works around this by just cleverly shuffling registers, so that the next paste operations work properly. But if I need to persist the yank onto the filesystem then I seem to be out of luck.
The text was updated successfully, but these errors were encountered:
I'm trying to write some vimscript to allow me to instantly write the yanked buffer out to my filesystem, so that I can make more tools around it. (mainly so I can be able to slurp the yank into another instance of Vim, when on a headless machine that does not have a clipboard)
Of course, I'd like to keep vim yankstack functionality intact.
Now I also expect that yankstack itself has some code that achieves (using some black magic) the slurping of the buffer.
I've been reading the source code and I'm still a little confused.
My main limiting issue is that I need to cause the original yank behavior to proceed, in particular in visual mode, and to run some code AFTER that happens. This appears to be essentially impossible without manually reimplementing what the
y
key does because the contents of the yank buffer do not land until after it happens, and in an expr map I have to have the thing return (and therefore any funcs it calls) the"y"
value in order for that yank to proceed.Maybe yankstack works around this by just cleverly shuffling registers, so that the next paste operations work properly. But if I need to persist the yank onto the filesystem then I seem to be out of luck.
The text was updated successfully, but these errors were encountered: