vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.24k stars 3.51k forks source link

"Select to copy" does not work from inside tmux session #3755

Open AntonNiklasson opened 5 years ago

AntonNiklasson commented 5 years ago

Issue

The "select to copy to system clipboard" feature seems to not be working properly from inside a tmux session. #2439 is a kind of a duplicate, but focuses on Hyper 2.

MissingRoberto commented 5 years ago

Same issue, dealbreaker for me. I will start using iTerm2 again :(

wavefancy commented 4 years ago

Same issue, Hyper 3.0.2.

thamaraiselvam commented 3 years ago

It has been more than 2 years, Still it is not fixed? :/

quuu commented 2 years ago

bump

sairoutine commented 2 years ago

This issue still occurs to me in v3.2.3, which makes me hesitant to use Hyper.

helbing commented 1 year ago

This issue still occurs to me in v3.2.3, which makes me hesitant to use Hyper.

+1

MirkoManojlovic commented 1 year ago

For anyone that struggles with this, I've setup vim like copy/paste from this article here

https://dev.to/iggredible/the-easy-way-to-copy-text-in-tmux-319g

and set copyOnSelect: true

and it is working 🥳

Version: Hyper 3.3.0 (stable)

tmux.conf file

unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"

# Turn on vim mode
setw -g mode-keys vi

# Copy-paste like vim
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
helbing commented 1 year ago

For anyone that struggles with this, I've setup vim like copy/paste from this article here

https://dev.to/iggredible/the-easy-way-to-copy-text-in-tmux-319g

and set copyOnSelect: true

and it is working 🥳

Version: Hyper 3.3.0 (stable)

tmux.conf file

unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"

# Turn on vim mode
setw -g mode-keys vi

# Copy-paste like vim
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"

Still not working.

https://user-images.githubusercontent.com/7275620/207372361-e38acf91-f7bd-46e1-89c2-a7a104a789bf.mov

5aberd2 commented 1 year ago

I can confirm that this still doesn't work from tmux session even after trying @MirkoManojlovic comment so still waiting for a SOLUTION.

cnwangjie commented 1 year ago

I have the same problem when I migrate to a new device. But it works after I installed tmux plugins by tpm (prefix + I). It might be worth a try.

Maybe it is because I'm using tmux-yank