Skip to content

Instantly share code, notes, and snippets.

@TheLouisHong
Last active July 4, 2017 02:50
Show Gist options
  • Save TheLouisHong/c2832dc2d7ad329be395b33480e27490 to your computer and use it in GitHub Desktop.
Save TheLouisHong/c2832dc2d7ad329be395b33480e27490 to your computer and use it in GitHub Desktop.
Louis Hong .tmux.conf

Louis Hong .tmux.conf

Really barebone .tmux.conf that's useful for everyone.

How to install

Copy paste into your ~ directory

How to use

  1. Line 5 -> Line 15 gives me a VIM copy-paste experience, comment it out if you haven't learned VIM yet
  2. Tmux takes over your mouse controls, but sometimes it's nice to give that control back to your terminal client. Use CTRL-B then m to give terminal client control, CTRL-B then M to reverse.

What's next for beginners reading this

Cool, now you have a starter .tmux.conf.

  • Next, learn VIM. Text editing is critical for using Linux through SSH/BASH. (I think)

Related

Louis Hong .bashrc

#Enabled mouse scrolling
setw -g mouse on
#Enabled vi keys in copy mode
setw -g mode-keys vi
# Better copy paste
# http://jasonwryan.com/blog/2011/06/07/copy-and-paste-in-tmux/
# 2017.6.3 Screen changed and mode-mouse is just mouse now
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/
# set mouse on with prefix m
bind m \
set -g mouse on \;\
display 'Mouse: ON'
# set mouse off with prefix M
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
# Makes esc not lag for VIM
set -s escape-time 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment