michaelrommel / nvim-silicon

neovim plugin to create code images using the external silicon tool.
MIT License
138 stars 9 forks source link

Simultaneously create a file to copy to clipboard #4

Closed IvanKarpov-1 closed 8 months ago

IvanKarpov-1 commented 8 months ago

As I understand it, it is currently impossible to create a file and copy it to a clipboard at the same time. Is this a limitation of Slilicon or is it just the way the plugin is designed?

If it's not a limitation of Slilicon itself, it would be great to be able to create an image and copy it to a clipboard at the same time.

michaelrommel commented 8 months ago

Hi Ivan,

this is a limitation of silicon itself. If you supply the --to-clipboard and -o test.png flags, the output file is not written. Sure, one could work around that by calling the silicon command two times in sequence, but I think then it might be easier to just setup two keybindings in neovim for each use case and decide which one to use or both after one another. The end result will be the same. But thank you for your suggestion and best wishes from Germany!

Michael.

IvanKarpov-1 commented 8 months ago

Hi, thank you for your quick response.

Well, I see. In this case, I will choose what I need in a particular situation, whether to save to a file or to the clipboard.