Skip to content

Instantly share code, notes, and snippets.

@rahulkmr
Created March 30, 2013 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulkmr/5275679 to your computer and use it in GitHub Desktop.
Save rahulkmr/5275679 to your computer and use it in GitHub Desktop.
# remap prefix to C-a
unbind C-b
set -g prefix C-a
bind a send-prefix
# force a reload of the config files.
unbind r
bind r source-file ~/.tmux.conf
# Screen like bindings.
# quick pane cycling
unbind ^A
bind ^A last-window
# rebind split keys.
unbind %
bind | split-window -h
unbind '"'
bind S split-window -v
bind '"' choose-window
# rebind kill key
bind K confirm-before 'kill-window'
# displays
unbind *
bind * list-clients
# title A
unbind A
bind A command-prompt "rename-window %%"
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
# status bar cusomtizations.
#set -g display-time 3000
set -g status-bg white
set -g status-fg black
set -g status-left ''
set -g status-right "[#[bg=green]#S#[default]]"
set-window-option -g window-status-current-attr bright
set-window-option -g window-status-current-bg green
setw -g automatic-rename off
# vim like bindings.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# use vim motion keys while in copy mode.
setw -g mode-keys vi
# scrollback buffer n lines.
set -g history-limit 10000
# command/message line colors
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# resize panes like vim
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
## fix the titles.
set -g set-titles on
set -g set-titles-string "#I.#P: #W"
#Copy tmux paste buffer to CLIPBOARD
bind C-c run "tmux show-buffer | xclip -i -sel clipboard"
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind C-v run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment