diff --git a/README.md b/README.md index 26a40ce..4f49f87 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). -_990 TILs and counting..._ +_991 TILs and counting..._ --- @@ -878,6 +878,7 @@ _990 TILs and counting..._ - [Create A New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md) - [Cycle Through Layouts](tmux/cycle-through-layouts.md) - [Enabling Vi Mode](tmux/enabling-vi-mode.md) +- [Get Mouse Copy/Paste Working In Kitty](tmux/get-mouse-copy-paste-working-in-kitty.md) - [Hiding The Status Bar](tmux/hiding-the-status-bar.md) - [Jumping Between Sessions](tmux/jumping-between-sessions.md) - [Kill All Your tmux Sessions](tmux/kill-all-your-tmux-sessions.md) diff --git a/tmux/get-mouse-copy-paste-working-in-kitty.md b/tmux/get-mouse-copy-paste-working-in-kitty.md new file mode 100644 index 0000000..94d21c5 --- /dev/null +++ b/tmux/get-mouse-copy-paste-working-in-kitty.md @@ -0,0 +1,21 @@ +# Get Mouse Copy/Paste Working In Kitty + +With tmux's mouse mode enabled (`set-option -g -q mouse on`), you can use the +mouse to make a drag selection of some text. You can then paste it within a +tmux session using `Cmd+v`. + +If you are using tmux within the [Kitty terminal +emulator](https://sw.kovidgoyal.net/kitty/), you'll get more text pasted than +you bargained for. Kitty's clipboard _appends_ by default. So after several +selections have made there way into tmux's buffer history, a paste will result +in all of those buffers values being appended together and output to the +terminal. + +To fix this, you need to change Kitty's clipboard to be `no-append`. + +``` +# ~/.config/kitty/kitty.conf +clipboard_control write-clipboard write-primary no-append +``` + +[source](https://github.com/kovidgoyal/kitty/issues/782#issuecomment-502927322)