Skip to content

Instantly share code, notes, and snippets.

@moorereason
Created February 16, 2016 19:23

Revisions

  1. moorereason created this gist Feb 16, 2016.
    106 changes: 106 additions & 0 deletions tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,106 @@
    # Configuration ################################## {{{

    # use 256 colors
    set -g default-terminal "screen-256color"

    # increase scroll-back history
    set -g history-limit 5000

    # use vim key bindings
    setw -g mode-keys vi
    setw -g status-keys vi

    # disable mouse
    #setw -g mode-mouse off

    # decrease command delay (increase vim responsiveness)
    set -sg escape-time 1

    # increase repeat time for repeatable commands
    set -g repeat-time 1000

    # start window index at 1
    set -g base-index 1

    # start pane index at 1
    set -g pane-base-index 1

    # highlight window when it has new activity
    setw -g monitor-activity on
    set -g visual-activity on

    # renumber windows when one is closed
    set -g renumber-windows on
    # }}}


    # Key Bindings ################################### {{{
    bind h select-pane -L
    bind j select-pane -D
    bind k select-pane -U
    bind l select-pane -R

    bind n next-window
    bind p previous-window
    # }}}


    # Status Bar ##################################### {{{

    # enable UTF-8 Support
    set -g status-utf8 on

    # set refresh interval
    set -g status-interval 30

    # center the status bar
    set -g status-justify left

    # show session, window, pane in left status bar
    set -g status-left-length 40
    set -g status-left '#[fg=green]#S#[fg=blue] #I:#P#[default]'

    # show hostname, date, time in right status bar
    set -g status-right '#[fg=green]#H#[default] '
    #set-option -g status-right '#[fg=green]#H#[default] %Y.%m.%d %I:%M'
    # }}}


    # Colors ######################################### {{{

    # color status bar
    set -g status-bg colour235
    set -g status-fg white

    # highlight current window
    set-window-option -g window-status-current-fg black
    set-window-option -g window-status-current-bg green

    # set color of active pane
    set -g pane-border-fg colour235
    set -g pane-border-bg black
    set -g pane-active-border-fg green
    set -g pane-active-border-bg black
    # }}}

    # Plugins ######################################## {{{

    ## REQUIRES TMUX 1.9+ :sad:

    # List of plugins
    # Supports `github_username/repo` or full git repo URLs
    set -g @tpm_plugins ' \
    tmux-plugins/tpm \
    tmux-plugins/tmux-sensible \
    tmux-plugins/tmux-yank \
    '

    # Other examples:
    # github_username/plugin_name \
    # git@github.com/user/plugin \
    # git@bitbucket.com/user/plugin \

    # Initializes TMUX plugin manager.
    # Keep this line at the very bottom of tmux.conf.
    #run-shell '~/.tmux/plugins/tpm/tpm'
    # }}}