Eugeny / tabby

A terminal for a more modern age
https://tabby.sh
MIT License
59.79k stars 3.41k forks source link

copy not working when editing a file with vim #7266

Closed thudjx closed 2 years ago

thudjx commented 2 years ago

Describe the problem: I have turned copy on select on and want to copy multilines when editing a file using vim. If interaction using mouse is diabled, copy on select works fine, although I have to suffer from the copied linenumbers(I have set number; set relativenumber in vim) when copying multilines at once: image

If the mouse interaction is turned on, I can select multilines of pure text without the linenumbers, but I cannot copy the text. I have tried the copy in the menu but it doesn't work(the paste button in the menu works as expected). image

To Reproduce: Vim configuration:

set number
set relativenumber
set mouse=a

I am editing files in a remote server. Not sure whether this will make things more complicated.

Eugeny commented 2 years ago

Not a vim user, but the vim's own selection (on the right) is not "selection" in terms of terminal state, but rather just gray background. It's very likely that vim also has its own "copy" command somewhere that would use this selection.

Eugeny commented 2 years ago

Check out https://github.com/ojroques/vim-oscyank

GitHub
GitHub - ojroques/vim-oscyank: A Vim plugin to copy text through SSH with OSC52
A Vim plugin to copy text through SSH with OSC52. Contribute to ojroques/vim-oscyank development by creating an account on GitHub.
Eugeny commented 2 years ago

Also if that doesn't work, as a workaround, you can hold Alt when selecting text to use rectangular selection

thudjx commented 2 years ago

Thanks for your kind reply. I have compromised to use tmux clipboard in remote server. This solved most of the problem as the majority of text copying and clipping happens inside the server itself. Besides, the problem of copying from remote to local is solved by using the plugin you mentioned. Thanks again and I am closing the issue.