Skip to content

Instantly share code, notes, and snippets.

@yujiod
Created March 7, 2018 15:37
Show Gist options
  • Save yujiod/9a9a6212a84017855602f77155fafa0d to your computer and use it in GitHub Desktop.
Save yujiod/9a9a6212a84017855602f77155fafa0d to your computer and use it in GitHub Desktop.
set-option -g default-shell /usr/local/bin/fish
set-option -g default-command /usr/local/bin/fish
#set-option -g display-time 3000
#set-option -g status-interval 1
set-option -g set-titles on
set-window-option -g utf8 on
# auto window rename
setw -g automatic-rename
# mouse setting
# set-window-option -g mode-mouse on
set-option -g mouse-select-pane on
# set-option -g mouse-resize-pane on
# log output
bind-key H pipe-pane 'cat >> $HOME/.tmux/tmux-#W.log' \; display-message 'Started logging to $HOME/.tmux/tmux-#W.log'
bind-key h pipe-pane \; display-message 'Ended logging to $HOME/.tmux/tmux-#W.log'
# customize F1~F4
bind-key -n F1 next-layout
bind-key -n F2 new-window ; rename-window -
bind-key -n F3 previous-window
bind-key -n F4 next-window
# vim friendly copy-mode
set-window-option -g mode-keys vi
bind-key -n C-j copy-mode \; send-keys NPage
bind-key -n C-k copy-mode \; send-keys PPage
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
set -g status-right '#(byobu-status tmux_right)'$BYOBU_DATE$BYOBU_TIME
#set -g status-right '#(byobu-status tmux_right)'
bind e setw synchronize-panes on
bind E setw synchronize-panes off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment