←back to thread

538 points todsacerdoti | 1 comments | | HN request time: 0.209s | source
Show context
pxc ◴[] No.44358013[source]
If you don't want to write a giant regex like this yourself, there are some ready-made tmux plugins that add things like this to copy-mode.

https://github.com/tmux-plugins/tmux-fpp

https://github.com/tmux-plugins/tmux-copycat

https://github.com/Morantron/tmux-fingers

https://github.com/tmux-plugins/tmux-urlview

Any configuration or plugin that leans on the built-ins is probably going to be faster, so consider that w/r/t tmux-copycat.

I also really like tmux-resurrect, which saves and restores sessions for you; tmux-continuum, which runs those automatically; and the tmux-zen plugin for Oh-My-Fish:

https://github.com/tmux-plugins/tmux-resurrect

https://github.com/tmux-plugins/tmux-continuum

https://github.com/sagebind/tmux-zen/tree/master

It's pretty easy to get a very nice tmux setup going!

replies(2): >>44358431 #>>44363402 #
jynelson ◴[] No.44358431[source]
yeah, i got the original regex from tmux-copycat. but a) that regex doesn't handle `:` and b) copycat builds its own "viewer" abstraction on top of saving and restoring the pane state, which means that you can only have one action per search. my thing allows you to use normal tmux configuration syntax to bind actions to the files that are highlighted, because it reuses tmux's built-in search. note how all these plugins are either only supporting copy/paste or building their own "modes" on top, because tmux gives you very little control over highlights unless you use the built-in search.
replies(1): >>44360994 #
pxc ◴[] No.44360994[source]
That's great info! Thanks for filling me in.

I used tmux for everything many years ago, but when I started the current job, I decided to try to do everything natively with Kitty instead. (IIRC one of my main reasons was that Kitty supports macOS' "secure input" features.)

But tbh I never got around to making my Kitty setup as nice as my old tmux one. I think I may switch back soon. It sounds like I may want to set things up differently in light of these new features!

replies(1): >>44365330 #
1. jynelson ◴[] No.44365330[source]
note that these are not features built in to tmux, they’re things i built on top because tmux allows doing meta-programming on the terminal scrollback.

i expect that kitty allows doing this kind of thing too, kitty and wezterm both seem very programmable. the main thing they’re both missing compared to tmux is session persistence, but if you don’t need that, tmux doesn’t gain you a lot.