惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
A
About on SuperTechFans
J
Java Code Geeks
G
Google Developers Blog
L
LangChain Blog
小众软件
小众软件
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
博客园 - 【当耐特】
IT之家
IT之家
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - Franky
博客园_首页
雷峰网
雷峰网
Microsoft Security Blog
Microsoft Security Blog
Vercel News
Vercel News
B
Blog
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell

jdhao's digital space

Conversion between base64 and OpenCV or PIL Image 腾讯云对象存储博客图床开启 CDN 加速(不需要购买额外域名) Search and Replace in Multiple Files in Vim/Neovim Change Table Column Width in LaTeX Image or Table Side by Side in LaTeX LaTeX 并排显示图像或表格 Firenvim: Neovim inside Your Browser Content inside HTML tags missing in Latest Hugo? Creating Markdown Front Matter with Ultisnips Labelme JSON 标注格式转 voc XML 格式 Nifty Nvim Techniques That Make My Life Easier -- Series 6 macOS 下如何为视频制作字幕 Running Command Asynchronously inside Neovim Resolving Merge Conflict after Git Stash Pop Pylint: command not found? A Hands-on Experience with Neovim's Built-in LSP Support How to Convert PDF to Images with Imagemagick 互联网上常用缩略语集锦 File Backup in Neovim Converting PDF Pages to Images with Poppler Nifty Nvim Techniques That Make My Life Easier -- Series 5 Neovim Configuration for System-wide Use How to sort a list of tuple or list in Python -- lambda or itemgetter? Building A Vim Statusline from Scratch 人类第一颗原子弹爆炸始末 Distributed Training in PyTorch with Horovod Learning Expect Programming Essential Knowledge about SSH Nifty LaTeX Techniques -- Series 1 更改 Adsense 邮寄地址,重新寄送 PIN
Tmux Plugin Install and Management
2019-01-17 · via jdhao's digital space

In this post, I want to share how to manage tmux plugins with Tmux plugin manager (i.e., tpm) and also mention a few useful plugins.

Install the plugin manager#

Like Vim, to add new tmux plugins, we can either manually install them or employ a plugin manager. Tpm is designed for this purpose, which helps to manage our plugins automatically.

Install tpm#

First, we need to install tpm itself:

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Add the following setting to your tmux configuration file .tmux.conf:

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# .... maybe more plugins here

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

Then you should refresh the tmux environment to make the change take effect:

Plugin management with tpm#

The following operations assume that you are in a tmux session.

plugin install#

  1. Add new plugin to ~/.tmux.conf with set -g @plugin '...'

  2. Press <prefix> + I1 (capital I) to fetch the plugin.

plugin update#

Press <prefix> + U to update existing plugins

plugin uninstall#

  1. Delete or comment out the plugin line in .tmux.conf

  2. Press <prefix> + alt + u to remove the plugin

Automatic install of tpm on new machines#

According to doc here, to automatically install tpm on a new machine, you can add the following setting to your .tmux.conf:

if "test ! -d ~/.tmux/plugins/tpm" \
   "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"

Plugins to Install#

Themes#

Themes are great. Here are a few themes you can try.

Tmux theme pack#

Tmux theme pack is a collection of themes.

Install it with tpm (add the following setting to .tmux.conf):

set -g @plugin 'jimeh/tmux-themepack'

Pick a theme:

set -g @themepack 'powerline/block/cyan'

tmux-colors-solarized#

tmux-colors-solarized is a solarized color theme for tmux.

Install it with tpm:

set -g @plugin 'seebi/tmux-colors-solarized'

Four themes are provided: 256, dark, light and base16. You can choose one via .tmux.conf option:

set -g @colors-solarized '256'
# set -g @colors-solarized 'dark'
# set -g @colors-solarized 'light'
# set -g @colors-solarized 'base16'

tmux-resurrect#

Tmux-resurrect let you easily restore all your tmux session after a system restart so that you do not need to do it manually.

Install it with tpm:

set -g @plugin 'tmux-plugins/tmux-resurrect'

key bindings#

It provides two key bindings for save and restore your tmux environment:

  • Save: <prefix> + Ctrl-s
  • Restore: <prefix> + Ctrl-r

For more plugins, you can find them here and here.