0

我开始用tmux,很好用,但是当我分割一个窗口时,默认的hjkl是vim-like pane switch,那为什么呢?如何输入hjkl?这是我的配置

unbind C-b
set -g prefix C-q
set -g default-terminal "screen-256color"
set -g display-time 3000
set -g history-limit 65535
set -g base-index 1
set -g pane-base-index 1
set -s escape-time 0
setw -g monitor-activity on
set -g visual-activity on
set-option -g mouse-select-pane on

#-- bindkeys --#

bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
unbind '"'
bind-key - splitw -v
unbind %
bind-key | split-window -h
#-- statusbar --#

set -g status-justify centre

set -g status-left "#[fg=green]#S:w#I.p#P#[default]"
set -g status-left-attr bright
set -g status-left-length 20

set -g status-right "#[fg=green]#(/usr/bin/uptime)#[default] • #[fg=green]#(cut -d ' ' -f 1-3 /proc/loadavg)#[default]"
set -g status-right-attr bright

set -g status-utf8 on
set -g status-interval 1


setw -g automatic-rename off

#set -g status-bg black
#set -g status-fg yellow

#setw -g window-status-current-attr bright
#setw -g window-status-current-bg red
#setw -g window-status-current-fg white

#-- colorscheme --#
#-- see also: https://github.com/seebi/tmux-colors-solarized --#

# default statusbar colors
set -g status-bg colour235 #base02
set -g status-fg colour136 #yellow
set -g status-attr default

# default window title colors
setw -g window-status-fg colour244
setw -g window-status-bg default
#setw -g window-status-attr dim

# active window title colors
setw -g window-status-current-fg colour166 #orange
setw -g window-status-current-bg default
#setw -g window-status-current-attr bright

# pane border
set -g pane-border-fg colour235 #base02
set -g pane-active-border-fg colour240 #base01

# message text
set -g message-bg colour235 #base02
set -g message-fg colour166 #orange

# pane number display
set -g display-panes-active-colour colour33 #blue
set -g display-panes-colour colour166 #orange

# clock
setw -g clock-mode-colour colour64 #green
4

1 回答 1

8
unbind-key j

bind-key j select-pane -D 

unbind-key k

bind-key k select-pane -U

unbind-key h

bind-key h select-pane -L

unbind-key l

bind-key l select-pane -R

如果您的意思是这样,则可以使用 h、j 等启用窗格切换 =)

于 2013-09-22T09:23:39.133 回答