"set-window-option -g mode-keys vi" doesn't work in .tmux.conf
<p>I've been able to turn-on the vi-mode inside tmux successfully by pressing <code>C-a :</code> (I've changed default prefix) and then typing <code>set-window-option mode-keys vi</code>. However, I can't make it stick by adding into <code>~/.tmux.conf</code>. Here is my config:</p>

<pre><code># Change default prefix key to C-a
unbind-key C-b
set -g prefix 'C-a'
bind-key 'C-a' send-prefix

# Configure Vim mode for navigating text and selection
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection

# Allow navigating panes with vi-like commands.
bind k selectp -U
bind j selectp -D
bind h selectp -L
bind l selectp -R
</code></pre>

<p>Notably, navigating panes using <code>kjhl</code> keys also doesn't work. Perhaps this is because tmux fails to execute set-window-option earlier in the script. What's wrong here?</p>