feat: sync internal clipboard with system#9
Conversation
- Implement String method for clipboard to format cells - Add github.com/atotto/clipboard dependency - Automatically write yanked or deleted cells to system clipboard
|
Hey! Thank you so much for the contribution. I wouldn't feel comfortable erasing the contents of the clipboard automatically. We should add a separate keybinding to copy to the system clipboard ("y+) for example. |
|
Honestly, it seemed the most natural way to me; that's how I have it configured in my nvim config. But if you think this is better, that's perfect for me. I'll fix it in in a while and upload a new commit. |
|
@maaslalani I was implementing the
I would like to know your opinion on this before proceeding with the implementation. |
This pull request resolves #7, integrating the system clipboard, allowing yanked (copied) and deleted cell content to be available outside the application. The main changes include importing the
github.com/atotto/clipboardpackage, serializing clipboard data to a tab-separated string, and writing it to the system clipboard during yank and delete operations.System Clipboard Integration:
github.com/atotto/clipboardas a dependency ingo.modto enable cross-platform clipboard access.sysclipininternal/sheets/clipboard.go.String()method for theclipboardtype to serialize clipboard contents as tab-separated values, with rows separated by newlines.storeYankClipboardandstoreDeleteClipboardmethods to write the serialized clipboard data to the system clipboard after yanking or deleting cells.