Skip to content

Instantly share code, notes, and snippets.

@pavelz
Created March 25, 2020 20:40
Show Gist options
  • Save pavelz/96b2cb29e151976f912b041508d7d84a to your computer and use it in GitHub Desktop.
Save pavelz/96b2cb29e151976f912b041508d7d84a to your computer and use it in GitHub Desktop.
# ctrl-b is not as good as ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# vi bindings for scrolling and searching
setw -g mode-keys vi
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
#set-option terminal-overrides "*256col*:colors=256,xterm*:XT"
# Mac specific thing, for UI apps to work from TMUX to macOS , like lunching macvim or atom from tmux shell
set-option -g default-command "reattach-to-user-namespace -l zsh"
# neovim seems to stall with esc going to command mode from edit mode so this is for that.
set -sg escape-time 20
# for real 24 bit color. tmux 2.3+
set -g default-terminal "xterm-256color-italic"
set -ga terminal-overrides ",xterm-256color-italic:Tc"
# set the current directopry from previous pane or window or whatever
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment