Hello, I’m trying to add clipboard functionality when yanking text in visual mode. Here’s what I got:
lvim.defineAction('copyclipboard', (cm: any, actionArgs: any) => {
console.log('copying!!!');
document.execCommand('copy');
// let lvim2 = cm.Vim as any; // maybe this?
lvim.handleKey(editor, 'y');
});
lvim.mapCommand('y', 'action', 'copyclipboard', {}, {extra: "visual"});
As you might expect this creates an infinite recursion. Is there a way for me to call the usual yank command in my defineAction?