Skip to content

Instantly share code, notes, and snippets.

@udzura
Created September 16, 2020 04:59
Show Gist options
  • Save udzura/ce9370a42e93c6abc38ff8ad9b4b84f3 to your computer and use it in GitHub Desktop.
Save udzura/ce9370a42e93c6abc38ff8ad9b4b84f3 to your computer and use it in GitHub Desktop.
##
# This file is owned by Uchio KONDO
# esc
unbind-key C-b
set-option -g prefix C-]
bind-key C-] send-prefix
# Act like Vim
set-window-option -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Look good
set-option -g default-terminal "screen-256color"
# Enable mouse support (works in iTerm)
# set-window-option -g mode-mouse on
# set-option -g mouse-select-pane on
# set-option -g mouse-resize-pane on
# set-option -g mouse-select-window on
# set up layouts
# set main-pane-width 130
# scrollback buffer size increase
set -g history-limit 500000
# C-b C-b will swap to last used window
bind-key C-b last-window
# Start tab numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
# Highlight active window
set-window-option -g window-status-current-style bg=red,dim
# use different keys to split vertical and horizonal
bind | split-window -h
bind - split-window -v
# Change cursor in vim to distinguish between insert and command mode
# Use in conjunciton with tmux-cursors.vim
set-option -g terminal-overrides '*88col*:colors=88,*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cc=\E]12;%p1%s\007:Cr=\E]112\007:Cs=\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%p1%{2}%-%;%d\007'
# from http://qiita.com/tt_yamaguchi/items/682940d558e4a5022898
bind C-t last-window
bind C-Space next
bind C-n next
bind C-p prev
# benri saikou
bind-key 'C-o' prev
bind-key 'C-p' next
bind-key 'C-[' copy-mode
bind C-c choose-window
set-option -g default-command "reattach-to-user-namespace -l zsh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment