Wednesday, September 26, 2018

TMUX and my favorite plugins...

Most of us use the command-line. To make it a bit comfortable we may use one of a terminal multiplexer. My favorite on is TMUX. Tmux allows you to tile windows panes in a command-line environment which helps you to keep an eye on multiple programs within the one terminal. 

simple install by brew on mac: $ brew install tmux

What makes tmux much more useable are the plugins. Those plugins can be installed to extend its functionality and you become to be more effective. Before you can install any plugin you need to install Tmux Plugin Manager by following steps:
1st: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
2nd: go to the your home directory and open .tmux.conf file
3rd: add following lines 
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
4th: reload your TMUX environment
$ tmux source ~/.tmux.conf
Tmux is ready to go. Now it's a time to add some useful plugins:

1. Tmux Resurect : this is great plugin when you have to restart or turn off you computer. It keeps all your sessions, when you have saved them before (prefix + s). To restore them press prefix + r. Such feature makes your life much easier when you administrating for example the farm of raspberry-PIs.
installation: open .tmux.conf file and add following 
line: set -g @plugin 'tmux-plugins/tmux-resurrect'
Done

No comments: