TMUX 边界被打破 iTerm2

TMUX borders are broken iTerm2

我目前正在使用 iTerm2、AMIX Vim 和 Tmuxline(其中包括 vim 航空公司)。

拆分窗格时,边框在水平方向和垂直方向上看起来都很糟糕(边框只在一半处并且是破折号)。我 禁用了 "Treat Ambiguous characters as double width",但这并不能解决问题。

我的 Tmux 配置:

# unbind some default keybindings
unbind C-b

# set prefix key to ctrl-g
set -g prefix C-g

# lower command delay
set -sg escape-time 1

# start first window and pane at 1, not zero
set -g base-index 1
set -g pane-base-index 1

# bind r to reloading the config file
bind r source-file ~/.tmux.conf \; display "Reloaded tmux config file."

# pass through a ctrl-a if you press it twice
bind C-a send-prefix

# better mnemonics for splitting panes!
bind \ split-window -h
bind - split-window -v

# vim / xmonad style bindings for pane movement
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R

# vim / xmonad style bindings for window movement
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+

# shift-movement keys will resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5

# disable mouse support (at least while we're learning)
setw -g mode-mouse off
set -g mouse-select-pane off
set -g mouse-resize-pane off
set -g mouse-select-window off

# turn on 256 color support in tmux
set -g default-terminal "screen-256color"

# fiddle with colors of status bar
set -g status-fg white
set -g status-bg colour234

# fiddle with colors of inactive windows
setw -g window-status-fg cyan
setw -g window-status-bg colour234
setw -g window-status-attr dim

# change color of active window
setw -g window-status-current-fg white
setw -g window-status-current-bg colour88
setw -g window-status-current-attr bright

# set color of regular and active panes
set -g pane-border-fg colour238
set -g pane-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-bg default

# set color of command line
set -g message-fg white
set -g message-bg colour22
set -g message-attr bright

# configure contents of status bar
set -g status-utf8 on
set -g status-left-length 40
set -g status-left "#[fg=green]\"#S\""

set -g status-right "#[fg=green] #h | %d %b %R"

set -g status-justify centre
setw -g monitor-activity on
set -g visual-activity on

# navigate using vim-style keys
setw -g mode-keys vi

# copy/paste using vim-style keys
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection

# xclip support (commented as this often doesn't make sense on remote servers)
#bind C-c run "tmux save-buffer - / xclip -i -sel clipboard"
#bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"

# set up aliases for temporarily maximizing panes
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp

unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp

# set up alias for turning on logging
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"

#source-file .tmuxline.conf

我的 Tmuxline 配置:

# This tmux statusbar config was created by tmuxline.vim
# on Fri, 12 Jun 2015

set -g status-bg "colour0"
set -g message-command-fg "colour10"
set -g status-justify "left"
set -g status-left-length "100"
set -g status "on"
set -g pane-active-border-fg "colour4"
set -g message-bg "colour8"
set -g status-right-length "100"
set -g status-right-attr "none"
set -g message-fg "colour10"
set -g message-command-bg "colour8"
set -g status-attr "none"
set -g status-utf8 "on"
set -g pane-border-fg "colour8"
set -g status-left-attr "none"
setw -g window-status-fg "colour12"
setw -g window-status-attr "none"
setw -g window-status-activity-bg "colour0"
setw -g window-status-activity-attr "none"
setw -g window-status-activity-fg "colour4"
setw -g window-status-separator ""
setw -g window-status-bg "colour0"
set -g status-left "#[fg=colour0,bg=colour4,bold] #S #[fg=colour4,bg=colour0,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=colour8,bg=colour0,nobold,nounderscore,noitalics]#[fg=colour10,bg=colour8] %Y-%m-%d  %H:%M #[fg=colour4,bg=colour8,nobold,nounderscore,noitalics]#[fg=colour0,bg=colour4] #h "
setw -g window-status-format "#[fg=colour12,bg=colour0] #I #[fg=colour12,bg=colour0] #W "
setw -g window-status-current-format "#[fg=colour0,bg=colour8,nobold,nounderscore,noitalics]#[fg=colour10,bg=colour8] #I #[fg=colour10,bg=colour8] #W #[fg=colour8,bg=colour0,nobold,nounderscore,noitalics]"

边框向下一半是因为它用您的 pane-border-fg 颜色渲染上半部分。您可以检查您的 iterm2 设置以确保它正在报告终端类型 xterm-256color。您也可以尝试将 pane-border-fg 颜色更改为标准颜色之一。