0

Is there actually any way / plugin to be able to quickly jump to a session?

Currently I <leader>s to open the session-list page and then I select the one I want.

And if I have a session that I want to jump to a lot, I don't know how to do it.

  • You could use byobu. It is built on the top of tmux and its key-bindings are more sensible. – shivams May 26 '15 at 19:08
3

You are likely looking for 'switch-client' command

switchc -t <session name|number>

example

# create a named session
tmux new -s 'main_session'

# to switch to it you would use the command
switchc -t 'main_session'

To the session which you jump a lot, if you name it the same every time then you can bind a key for it. In your ~/.tmux.conf file add

bind  J  switchc -t 'main_session'

Other great options would be :

# last session used, great for toggling between two sessions
# tmux binds this command to 'L' by default
switchc -l

# to rotate through all sessions
switchc -n

# to go to a named session
command-prompt -p 'switch to session : ' 'switchc -t %1'

You could add these bindings to your ~/.tmux.conf

# rotate through sessions
bind  R  switchc -n

# go to a session by name
bind  S  command-prompt -p 'Session name : ' 'switchc -t %1'  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.