Skip to content

Instantly share code, notes, and snippets.

@davidnormo
Last active February 8, 2023 12:57
Show Gist options
  • Save davidnormo/a361d38eac62707941e7098eb98587f5 to your computer and use it in GitHub Desktop.
Save davidnormo/a361d38eac62707941e7098eb98587f5 to your computer and use it in GitHub Desktop.
My tmux config
# remap prefix from C-b to ` (backtick)
unbind C-b
set-option -g prefix `
bind-key ` send-prefix
unbind ^A
# Start window numbering at 1
set -g base-index 1
# use 256 term for pretty colors
set -g default-terminal "screen-256color"
# increase scroll-back history
set -g history-limit 10000
# select pane via mouse click
set -g mouse on
# copy + paste
# Use vim keybindings in copy mode
setw -g mode-keys vi
# vim bindings for select and copy
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'V' send -X select-line
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -Tcopy-mode-vi Escape send -X cancel
# open pane/window in same directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
run-shell ~/clone/path/resurrect.tmux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment