Skip to content

Instantly share code, notes, and snippets.

@haxcited
Created August 15, 2020 17:44
Show Gist options
  • Save haxcited/bfe8aa22e03181aa722ae1f9dc39483d to your computer and use it in GitHub Desktop.
Save haxcited/bfe8aa22e03181aa722ae1f9dc39483d to your computer and use it in GitHub Desktop.
set-option -g history-limit 1000000
set -g status-bg colour26
set -g status-fg white
# 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
# solution to non colour prompt
set-option -g default-command bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment