2 ms·
Yes it can! It's hard to get precisely the behaviour you want across tmux and vim. I'm 99% there with my config. Selecting any text copies it to the clipboard (
by raffraffraff 2y ago
Yes it can! It's hard to get precisely the behaviour you want across tmux and vim. I'm 99% there with my config. Selecting any text copies it to the clipboard (with options that work for Xorg or Wayland) and handling panels properly.
The only remaining annoyance for me, and one which I don't think is "fixable"... say your left pane is a terminal and you've got a few pages of output (cat something). The right pane has a file open on vim, where you're making notes. As you scroll through the long output you want to select a chunk of text and then paste it into vim, and then carry on scrolling as you hunt for the next clue. Except that the instant you select text, focus returns to the prompt at the bottom of the pane. You compete lose your scroll position. It's intensely annoying. The workaround is "don't do it that way", which is fine until you forget and end up shouting at your computer.
- pxc 2y agoDoes that reset/jump still happen when you're in copy-mode? If not, maybe you can you rebind the scroll wheel to enter copy-mode if it's not already in it, and then scroll, and bind enter/return while in copy-mode to exit copy-mode.
- raffraffraff 2y agoOddly enough I searched for a fix for this after posting. And amazingly I found one that works (as well as several that didn't, and one that require add-ons) For anyone interested, this is in my .tmux.conf now unbind -T copy-mode-vi Enter bind-key -T copy-mode-vi Enter send -X copy-pipe "xclip -selection c -i" \; send -X clear-selection bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe "xclip -selection c -i" \; send -X clear-selection You would have to switch the xclip for wl-copy if you're using Wayland, and some form of pbcopy command on Mac. No idea what windows folks do.