Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim, neovim剪切板集成 #83

Open
BrightXiaoHan opened this issue Jan 29, 2024 · 5 comments
Open

vim, neovim剪切板集成 #83

BrightXiaoHan opened this issue Jan 29, 2024 · 5 comments

Comments

@BrightXiaoHan
Copy link

一个想法,不知道能不能实现,或者适不适合通过tssh实现。
需求描述:
tssh登录到远程服务器后,vim,neovim的剪切板往往不能与PC机共享,有没有可能通过tssh,在vim上复制某段文本后,通过tssh发送到PC机剪切板上实现剪切板共享呢?
更进一步,能否通过某些api,与某个vim插件集成,在vim中的文件管理器中(如nvim-tree)通过某个快捷键直接触发tsz传输某个文件到PC机上。

@lonnywong
Copy link
Member

1、暂时没想到什么好的实现办法。

2、你可以在 vim / nvim 中自定义个快捷键,这个快捷键的动作是临时打开一个新窗口并执行 tsz xxx,参数你可以在定义快捷键时传过去。

@BrightXiaoHan
Copy link
Author

BrightXiaoHan commented Feb 4, 2024

@lonnywong
Copy link
Member

感谢应该可以直接用?ssh 支持的话,tssh 按理说也是支持的。

@petersonchen
Copy link

為了要讓不支援的 terminal app 使用 trzsz , 所以也使用了 tssh

osc 52 要支持的前提是 本地的终端需要支持 OSC
就像是 trzsz 也需要 本地的终端機需要支援 , 但我的理解是後來只要 local terminal app 可以開啟 local shell , 就可以使用 tssh 來達到 , 所以是否 tssh 也可以支援 OSC 52 , 這樣就可以讓不支援 OSC 52 的 terminal app 也可以支援 copy text to os clipboard

https://sspai.com/post/71018

@lonnywong
Copy link
Member

看来是可以解释 osc 52 ,并写到 clipboard 中去。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants