Fuzzy-switching sesssion in tmux script

https://jdhao.github.io/2021/11/20/tmux_fuzzy_session_switch/

I found this post really helpful to anyone who is using tmux

9 points · 7 comments · view on lemmy.world

7 Comments

gelert@lemmy.world · 5 pts · 3y (3 replies)

If you're using Neovim as well as tmux, telescope-tmux is pretty awesome for switching sessions, windows and more.

howarddo@programming.dev · 1 pts · 3y (2 replies)

Very nice, thanks. But I'm not always inside neovim to use this plugin tho

gelert@lemmy.world · 2 pts · 3y (1 reply)

You don't have to already be inside of Neovim.

Tmux 3.2's new display-popup command is a neat way to access the telescope picker when you are outside of Neovim.

source: https://github.com/camgraff/telescope-tmux.nvim#use-with-tmux-display-popup

You can just set up a keybinding, and a new instance of Neovim will start in a popup window inside of Tmux.

There's a fractional delay while Neovim starts up, but I find it well within tolerance, personally.

howarddo@programming.dev · 1 pts · 3y

nice, I'll check it out

chaoticAnimals@programming.dev · 2 pts · 3y

I don't know how I missed this. Ty!

gamma@programming.dev · 2 pts · 3y (1 reply)

I've only used the builtin choose-session, and haven't had the need for anything more (I usually only have one session, maybe 3 at most) but this gives me ideas to iterate over all open panes with previews given by fzf --preview 'tmux capture-pane -p -t {}'.

howarddo@programming.dev · 2 pts · 3y

Yeah, whatever fits you, I usually open each repo in seperated session with tmux-sessionizer so fuzzy find session is useful