Created
October 9, 2016 14:31
-
-
Save xiaq/7bdee1cd6e62c188b38941e7ef80508c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -s escape-time 50 | |
| if-shell "test $TERMINAL = roxterm" "set -s set-clipboard off" | |
| elvish='$GOPATH/bin/elvish' | |
| if-shell "test -x $elvish" "set -g default-shell $elvish" | |
| set -g base-index 1 | |
| set -g renumber-windows on | |
| set -g mouse | |
| set -g repeat-time 360 | |
| set -g display-time 1000 | |
| set -g repeat-time 300 | |
| set -g history-limit 65536 | |
| set -g default-terminal screen-256color | |
| set -g visual-bell off | |
| set -g set-titles on | |
| set -g status-interval 6 | |
| set -g status-justify centre | |
| set -g status-left '#[bold,reverse]#H#[default]#S' | |
| set -g status-left-length 16 | |
| set -g status-right '%H:%M' | |
| # The color scheme prefers dark background. | |
| set -g status-fg white | |
| set -g status-bg default | |
| set -g pane-active-border-fg colour33 | |
| set -g status-left-bg colour28 | |
| set -g status-right-bg colour28 | |
| set -g message-bg colour230 | |
| tty="tmux display-message -p '#{pane_tty}' | sed 's|^/dev/pts/||'" | |
| window_fmt="#[underscore]#I#[nounderscore]#W(#($tty))" | |
| setw -g wrap-search off | |
| setw -g window-status-format "$window_fmt#F" | |
| setw -g window-status-current-format $window_fmt | |
| setw -g window-status-bg black | |
| setw -g window-status-current-bg colour202 | |
| setw -g window-status-current-attr bold | |
| setw -g word-separators " -_@." | |
| setw -g mode-keys vi | |
| setw -g xterm-keys on | |
| setw -g automatic-rename on | |
| #bind -n ^A send-prefix | |
| #bind -r ^A send-keys ^A | |
| # Prefixless bindings | |
| bind -n M-t new-window -c '#{pane_current_path}' | |
| bind -n M-T new-window | |
| bind -n M-- previous-window | |
| bind -n M-= next-window | |
| bind -n M-_ swap-window -t:- | |
| bind -n M-+ swap-window -t:+ | |
| bind -n M-c split-window -h -c '#{pane_current_path}' | |
| bind -n M-v split-window -v -c '#{pane_current_path}' | |
| bind -n M-j select-pane -D | |
| bind -n M-k select-pane -U | |
| bind -n M-h select-pane -L | |
| bind -n M-l select-pane -R | |
| bind -n M-J resize-pane -D | |
| bind -n M-K resize-pane -U | |
| bind -n M-H resize-pane -L | |
| bind -n M-L resize-pane -R | |
| bind -n M-q confirm-before -p 'Kill pane?' kill-pane | |
| bind -n M-r source ~/.tmux.conf \; display-message "Reloaded .tmux.conf" | |
| bind -n M-PageUp copy-mode -u | |
| bind -n M-PageDown copy-mode | |
| bind -n M-\ copy-mode |
所以后来只用这几个:
bind -n M-{ previous-window
bind -n M-} next-window
bind -n M-t new-window -c '#{pane_current_path}'
bind -n M-T new-window
bind -n M-d split-window -h -c '#{pane_current_path}'
bind -n M-D split-window -v -c '#{pane_current_path}'
bind -n M-] select-pane -t :.+
bind -n M-[ select-pane -l
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
今天试了一下你的Prefixless bindings果然好用。
不过,为了和macOS上的iTerm2的绑定兼容: