hyper icon indicating copy to clipboard operation
hyper copied to clipboard

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

Open AntonNiklasson opened this issue 5 years ago • 8 comments

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: macOs 10.14.5
  • Hyper.app version: 3.0.2
  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/AntonNiklasson/41d41349552b76613bdf191df2511132
  • Relevant information from devtools (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere):
  • The issue is reproducible in vanilla Hyper.app:

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.

AntonNiklasson avatar Jul 05 '19 14:07 AntonNiklasson

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

MissingRoberto avatar Sep 25 '19 14:09 MissingRoberto

Same issue, Hyper 3.0.2.

wavefancy avatar Apr 08 '20 21:04 wavefancy

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

thamaraiselvam avatar Aug 05 '21 16:08 thamaraiselvam

bump

quuu avatar Oct 31 '21 18:10 quuu

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

sairoutine avatar Jun 27 '22 10:06 sairoutine

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

+1

helbing avatar Oct 12 '22 10:10 helbing

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"

MirkoManojlovic avatar Dec 13 '22 11:12 MirkoManojlovic

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

helbing avatar Dec 13 '22 15:12 helbing

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

5aberd2 avatar Feb 12 '23 15:02 5aberd2

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

cnwangjie avatar Mar 07 '23 17:03 cnwangjie