linux - .tmux.conf 不是在 Mac 上读取而是在 Linux 上读取?

标签 linux macos tmux

我试图简单地将我的 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/

相关文章:

linux - 加载共享库时出错 : libevent-2. 0.so.5

android - cordova 构建 android 在 :app:mergeReleaseResources step with "Daemon startup failed" message 上失败

objective-c - 核心数据 NSManagedObject : Max Number of Attributes?

tmux - 在 tmux 2.4 上如何一次性进入复制模式并开始搜索?

macos - 是否可以通过 Homebrew 软件在 OSX 10.9 上安装 Erlang R16?

iphone - 使用 BWToolkit 框架 API

tmux - 是否可以向 tmux Pane 添加类似选项卡的功能?

linux - 如何在数组中存储包含双引号的命令参数?

linux - 使用 Linux 命令从文本中删除一些行

linux - 在glassfish 3.1.2中隐藏8383端口