Closed HarshalRathore closed 3 weeks ago
Hello @HarshalRathore,
I'm afraid it's going to be all uphill. Maybe you don't need to extract anything? tmux has evolved quite a lot since I added this feature and maybe the latest version supports what you need: https://github.com/tmux/tmux/wiki/Clipboard
Thanks for your prompt reply. Yes, I have been trying to make this mess of a script work for the past 16~ish hours but to no avail :sob:. Actually i want to ask that the functionality in your config to enter copy mode with <prefix>+Enter
how can i recreate that not the copy part? any guidance would be appreciated thanks.
I'm not sure what you're after...
This is a stock tmux binding:
bind-key -T prefix Enter copy-mode
Sorry my bad for not describing correctly what i wanted, but anyway i looked at docs that you mentioned and seems like tmux is preety self-sufficient in this copy-paste thing this is what i came up with
bind Enter copy-mode -e # enter copy mode
# Use vi-style key bindings in copy mode
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi C-v send -X rectangle-toggle
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi H send -X start-of-line
bind -T copy-mode-vi L send -X end-of-line
It is working exactly how it was working with your stock config I think I don't even need to download any plugin like tmux-yank I don't know why though all those online articles show that we need this for this copy paste functionality i didn't even set how it'll copy selected text but tmux some how is doing this all by it self.
I am trying to break apart this config and trying to extract the copy functionality that you have implemented (BTW it is great i mean i have tried other copy plugins and they don't even come close to it thanks a lot) how do I do this?