我试图简单地将我的 tmux 设置中的前缀键从 C-b
更改为 C-\
在我的 linux 和 Mac OS X 计算机上,我在 ~/
中有一个名为 .tmux.conf
的文件>
文件中的所有设置都适用于我的 linux 系统,但没有一个适用于我的 Mac,我想知道是否有人知道这是为什么?
这是我的.tmux.conf
:
# Set colors
set-option -g default-terminal "screen-256color"
# Set reload key to r
# bind r source-file ~/.tmux.conf
# Change prefix
unbind-key C-b
set -g prefix 'C-\'
bind-key 'C-\' send-prefix
# Count sessions start at 1
set -g base-index 1
# Set the title bar
set -g set-titles on
set -g set-titles-string '#(whoami) :: #h :: #(curl ipecho.net/plain;echo)'
# Set status bar
set -g status-utf8 on
set -g status-bg black
set -g status-fg white
set -g status-interval 5
set -g status-left-length 90
set -g status-right-length 60
set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=blue]#(hostname -s)#[fg=white]::#[fg=yellow]#(curl ipecho.net/plain;echo)"
set -g status-justify left
set -g status-right '#[fg=Cyan]#S #[fg=white]%a %d %b %R'
最佳答案
显然你还没有启动tmux-server
,它是tmux-server
在启动时读取~/.tmux.conf
文件,但不是 tmux
session 。
尝试终止所有 tmux session 并重新启动 tmux-server
例如
$ tmux kill-server
或者像这样尝试重新加载 ~/.tmux.conf
而无需重新启动服务器
:source-file ~/.tmux.conf
可能配置文件有错误。
关于linux - .tmux.conf 不是在 Mac 上读取而是在 Linux 上读取?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32962047/