Skip to content

Instantly share code, notes, and snippets.

@omgitsads
Created February 1, 2013 23:58
Show Gist options
  • Save omgitsads/4695042 to your computer and use it in GitHub Desktop.
Save omgitsads/4695042 to your computer and use it in GitHub Desktop.
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/.tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/.tmux-powerline/powerline.sh right)"
set -g status-bg black
set-window-option -g window-status-current-format "#[fg=black, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=black]⮀"
set-window-option -g window-status-format "#[fg=black, bg=colour12]⮀#[fg=colour255, bg=colour12] #I ⮁ #W #[fg=colour12, bg=black]⮀"
setw -g automatic-rename off
# Key bindings
bind \ split-window -h # Vertical split
bind | split-window -h # Vertical split
bind - split-window -v # Horizontal split
bind x kill-pane # Close current pane
bind a send-key C-a # Go to beginning of line
bind r source-file ~/.tmux.conf; display-message " ✓ reloaded .tmux.conf" # Reload configuration
# Switch between windows with arrow keys
bind -n S-Left previous-window
bind -n S-Right next-window
# Create new window with down
bind -n S-Down new-window
# 256 Colour terminal
set -g default-terminal "screen-256color"
# Buffer Size
set -g history-limit 5000
# Mouse Support
set -g mouse-utf8 on
set -g mouse-select-pane
set -g mouse-select-window
set-option -g mouse-resize-pane on
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
@emachnic
Copy link

emachnic commented Feb 2, 2013

Had to modify a bit but thought you might like a couple things I have as well

set -g prefix C-a     # Make C-a the prefix instead of default
bind C-a send-prefix  # Send to application
unbind C-b            # Unbind C-b
set -sg escape-time 1 # Remove delay for keystrokes
setw -g mode-keys vi  # Use vi mode

set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/Play/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/Play/tmux-powerline/powerline.sh right)"

set -g status-bg black
set-window-option -g window-status-current-format "#[fg=black, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=black]⮀"
set-window-option -g window-status-format "#[fg=black, bg=colour12]⮀#[fg=colour255, bg=colour12] #I ⮁ #W #[fg=colour12, bg=black]⮀"

setw -g automatic-rename off

# Key bindings
set -g base-index 1             # Window numbers start at 1
setw -g pane-base-index 1       # Pane numbers start at 1
bind \ split-window -h          # Vertical split
bind | split-window -h          # Vertical split
bind - split-window -v          # Horizontal split
bind x kill-pane                # Close current pane
#bind a send-key C-a             # Go to beginning of line
bind h select-pane -L           # Select left pane
bind j select-pane -D           # Select down pane
bind k select-pane -U           # Select up pane
bind l select-pane -R           # Select right pane

bind -r H resize-pane -L 5      # Resize pane left 5 lines
bind -r J resize-pane -D 5      # Resize pane down 5 lines
bind -r K resize-pane -U 5      # Resize pane up 5 lines
bind -r L resize-pane -R 5      # Resize pane right 5 lines

bind r source-file ~/.tmux.conf; display-message " ✓ reloaded .tmux.conf" # Reload configuration

bind -r C-h select-window -t :- # Cycle through windows left
bind -r C-l select-window -t :+ # Cycle through windows right

# Switch between windows with arrow keys
bind -n S-Left previous-window
bind -n S-Right next-window

# Create new window with down
bind -n S-Down new-window

#256 Colour terminal
set -g default-terminal "screen-256color"

# Buffer Size
set -g history-limit 5000

# Mouse Support
set -g mouse-utf8 on
set -g mouse-select-pane
set -g mouse-select-window
set-option -g mouse-resize-pane on

bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment