Skip to content

Instantly share code, notes, and snippets.

@madhukar93
Created March 24, 2018 09:24
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 madhukar93/f2bc68d25e5bba77e4d597e2b9ec001b to your computer and use it in GitHub Desktop.
Save madhukar93/f2bc68d25e5bba77e4d597e2b9ec001b to your computer and use it in GitHub Desktop.
set-option -g default-command "reattach-to-user-namespace -l zsh"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-open'
#set -g @plugin 'jimeh/tmux-themepack'
# Key bindings
# $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $
#
# vim-keys.conf, v1.2 2010/09/12
#
# By Daniel Thau. Public domain.
#
# This configuration file binds many vi- and vim-like bindings to the
# appropriate tmux key bindings. Note that for many key bindings there is no
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
# differently from the previous versions
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# bind : to command-prompt like vim
# this is the default in tmux already
# bind : command-prompt
# vi-style controls for copy mode
setw -g mode-keys vi
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# set-option -g default-command "reattach-to-user-namespace -l zsh" --- doesn't seem to be working ???
# don't automatically rename windows on executing a program
set-option -g allow-rename off
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# moment of weakness
# setw -g mouse on
# prevent 2 open sessions from syncing their sizes - used in conjunction with 'tmux new-session -t 'base''
setw -g aggressive-resize on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment