Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In tmux you can switch to window 2 with prefix_key + 2. I'd like to press rather prefix_key + u.

I tried in .tmux.conf this:

bind-key u 2

and this:

bind-key u select-window -t 2

Which doesn't work. Is it possible to create such mapping?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You need to include a colon to select based on index. Try this:

bind-key u select-window -t :2
share|improve this answer
    
This doesn't help. –  xralf May 12 '12 at 13:10
    
Did you reload your .tmux.conf? Also keep in mind window index are zero based unless you change with: set-option -g base-index 1 –  pengwynn May 12 '12 at 13:17
    
I exited tmux and lxterminal several times. I know it's zero based. –  xralf May 12 '12 at 13:24
1  
tmux instances share the same tmux session, _.tmux.conf is only read when the session is started. Make sure that the tmux list-sessions list is empty, or explicitly run source-file ~/.tmux.conf after starting tmux. –  Thor May 12 '12 at 13:52
    
@Thor Thanks a lot. source-file was necessary. –  xralf May 12 '12 at 17:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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