Skip to content

Instantly share code, notes, and snippets.

@haxcited
Created July 5, 2020 22:43
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 haxcited/6eb35e5e430905df4dc9530dd74704df to your computer and use it in GitHub Desktop.
Save haxcited/6eb35e5e430905df4dc9530dd74704df to your computer and use it in GitHub Desktop.
set-option -g history-limit 1000000
set -g status-bg colour26
set -g status-fg colour16
# remap prefix from 'C-b' to 'C-x'
unbind C-b
set-option -g prefix C-x
bind-key C-x send-prefix
# splits hor ver
unbind '"'
unbind %
bind 3 split-window -h
bind 2 split-window -v
#set emacs bindings
set -g status-keys emacs
set -gw mode-keys emacs
# https://github.com/tmux/tmux/wiki/Clipboard
bind -Tcopy-mode C-w send -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
bind -Tcopy-mode M-w send -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
bind -Tcopy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel 'xsel -i'
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# yank paste-buffer comand bind without prefix
unbind ]
bind -n C-y paste-buffer
# Enable switch session similar than emacs selecting buffer
# unbind s
unbind w
bind b choose-tree -w
# bind Left select-pane -L
# bind Right select-pane -R
# bind Up select-pane -U
# bind Down select-pane -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment