jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
2.94k stars 102 forks source link

Yank to system clipboard #192

Open brorbw opened 1 year ago

brorbw commented 1 year ago

A very preliminary stab at using the system clipboard for cutting, deleting and yanking. This does contain code for getting the system clipboard but I think that requires a bit more thought than I want to pour into this ATM.

The code is more or less "borrowed (read: stolen)" from https://github.com/kutsan/zsh-system-clipboard/blob/master/zsh-system-clipboard.zsh#L13-L87

niksingh710 commented 1 year ago

will this be merged?

brorbw commented 1 year ago

@jeffreytse I understand. I use this locally because otherwise it zsh-vi-mode breaks my workflow compared to other applications with a vim mode. I thought that if nothing else this could serve as an easy starting point for an implementation 🤷🏻

asmodeus812 commented 1 year ago

@brorbw i mean we have this already - https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh. Is it not possible to integrate it with this plugin ?

brorbw commented 1 year ago

@asmodeus812 I didn't know that existed. Yes it should make this implementation much easier

brorbw commented 1 year ago

@jeffreytse would using hmyzsh/ohmyzsh@master/lib/clipboard.zsh be the flexible solution you are looking for?

effinsky commented 1 year ago

@jeffreytse would using hmyzsh/ohmyzsh@master/lib/clipboard.zsh be the flexible solution you are looking for?

hope this sees some action sooon :)