Skip to content

Instantly share code, notes, and snippets.

@kirhgoff
Created December 21, 2016 02:26
Show Gist options
  • Select an option

  • Save kirhgoff/60ba8c1fe18a6dcde63fcacdbcc99f84 to your computer and use it in GitHub Desktop.

Select an option

Save kirhgoff/60ba8c1fe18a6dcde63fcacdbcc99f84 to your computer and use it in GitHub Desktop.

Revisions

  1. kirhgoff created this gist Dec 21, 2016.
    45 changes: 45 additions & 0 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    set -g default-terminal "screen-256color"
    set -sg escape-time 1

    unbind %
    bind | split-window -h
    bind - split-window -v

    # Set status bar
    set -g status-bg black
    set -g status-fg white
    set -g status-left '#[fg=green]#'

    # Set history limit
    set-option -g history-limit 5000

    setw -g monitor-activity on
    set -g visual-activity on

    # Highlight active window
    set-window-option -g window-status-current-bg red

    set-option -g default-command "reattach-to-user-namespace -l zsh"

    setw -g mode-keys vi
    bind -n S-Left select-pane -L
    bind -n S-Down select-pane -D
    bind -n S-Up select-pane -U
    bind -n S-Right select-pane -R

    # Resize
    bind h resize-pane -L 5
    bind j resize-pane -D 5
    bind u resize-pane -U 5
    bind k resize-pane -R 5
    set-option -g mouse on

    bind -t vi-copy v begin-selection

    # Copy current selection to buffer (and exit copy mode)
    bind -t vi-copy y copy-selection

    unbind y
    bind y save-buffer /tmp/tmux-buffer \; run-shell "reattach-to-user-namespace -l zsh -c 'cat /tmp/tmux-buffer|pbcopy'"

    bind-key r source-file ~/.tmux.conf