Skip to content

Instantly share code, notes, and snippets.

@SnoringFrog
Created April 17, 2020 13:49
Show Gist options
  • Save SnoringFrog/dca5081bd84a4ac1581c5eac77cbd068 to your computer and use it in GitHub Desktop.
Save SnoringFrog/dca5081bd84a4ac1581c5eac77cbd068 to your computer and use it in GitHub Desktop.
# Change command prefix to `
unbind C-b
set -g prefix C-n
bind C-n send-prefix
#unbind C-b
#set -g prefix `
#bind ` send-prefix
# Use 1-based indices for windows
set -g base-index 1
setw -g pane-base-index 1
# Use Vim mode and some custom vim-like keys
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'y' send -X keys copy-pipe 'putclip'
bind-key -T copy-mode-vi 'v' send-keys begin-selection
# Mouse options
set-window-option -g mouse on
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe 'putclip' # enable mouse selection/copying
# Managing splits
bind \ split-window -h -c "%{pane_current_path}" #using \ in place of | to remove the need for shift
bind - split-window -v -c "%{pane_current_path}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment