https://saltiga.hatenablog.com/entry/2020/02/14/235139
I want to copy the output of cat as it is! !!
Install tmux
↓
Create the following files
{~/.tmux.conf}
set-option -g default-command "exec reattach-to-user-namespace -l $SHELL"
setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
↓
Press Ctrl + b + [to enter copy mode.
You can move the cursor like vim and yank with y.
Recommended Posts