Alkindi42 / tmux-plug

Tmux Plugin Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tmux-plug (tmux plugin manager)

A tpm-based Tmux plugin manager.

  • CLI
  • Prettier (colored)
  • Display plugins loading time
  • Can be used without tmux running
  • Supports branch based installs
  • Supports custom config file locations
  • Compatible with existing plugins written for tpm

Table of Contents

Installation

Requirements

  • Tmux
  • Git
  • Bash
git clone https://github.com/Alkindi42/tmux-plug ~/.tmux/plugins/tmux-plug

At the bottom of your .tmux.conf add your plugins and load the tmux plugin manager:

# List of plugins
set -g @plugin 'Alkindi42/tmux-plug' # keep the tmux plugin manager up to date

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# 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/tmux-plug/tplug'

Don't forget to reload your tmux configuration:

$ tmux source ~/.tmux.conf

That's it!

You can find a list of awesome plugins/resources here or here.

Usage

Introduction

You can install, update and clean plugins with the CLI (tmux does not need to be running) or with key bindings. By default the key binding are the same as tpm.

Install plugins

  1. Add new plugin in your .tmux.conf file with set -g @plugin ...
  2. Press prefix + I to fetch the plugin

Example:

# At the bottom of your .tmux.conf
set -g @plugin 'tmux-plug/tmux-open'
set -g @plugin 'tmux-plug/tmux-copycat'

run -b '~/.tmux/plugins/tmux-plug/tplug'

Instead of using the key binding you can use the CLI:

$ tplug install

Uninstall plugins

  1. Remove (or comment out) plugin from the list.
  2. Press prefix + alt + u to remove the plugin.

Instead of using the key binding you can use the CLI:

$ tplug clean

All the plugins are installed to ~/.tmux/plugins so alternatively you can find plugin directory there and remove it.

Update plugins

Press prefix + U to update plugins or use the CLI:

$ tplug update

CLI

Tmux does not need to be running.

$ tplug
Usage: tplug [COMMAND]

Commands:
update     update plugins
list       list plugins installed
outdated   list outdated plugins
times      display plugins loading times
clean      remove plugins missing from tmux configuration
install    install new plugins present in tmux configuration

FAQ

Changing plugins install directory

By default tplug installs plugins in $XDG_CONFIG_HOME/tmux/plugins. You can change the install path by putting this in .tmux.conf:

set-environment -g TMUX_PLUGIN_MANAGER_PATH '/some/other/path/'

Display plugins loading time

$ tplug times
   72 ms - tmux-plugins/tmux-open
  600 ms - tmux-plugins/tmux-copycat
  231 ms - tmux-plugins/tmux-yank
   81 ms - tmux-plugins/tmux-resurrect
   28 ms - Alkindi42/tmux-bitwarden

Disable all default key bindings

Add this line in your .tmux.conf (before plugins initialization):

set -g @tplug-disable-key-bindings 'on'

Default: off

Add tplug into your shell

export PATH="$PATH:$HOME/.tmux/plugins/tmux-plug/bin"

About

Tmux Plugin Manager


Languages

Language:Shell 100.0%