Giter Club home page Giter Club logo

tpm's Introduction

Tmux Plugin Manager

Build Status

Installs and loads tmux plugins.

Tested and working on Linux, OSX, and Cygwin.

See list of plugins here.

Installation

Requirements: tmux version 1.9 (or higher), git, bash.

Clone TPM:

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

Put this at the bottom of ~/.tmux.conf ($XDG_CONFIG_HOME/tmux/tmux.conf works too):

# 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 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'

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

Reload TMUX environment so TPM is sourced:

# type this in terminal if tmux is already running
tmux source ~/.tmux.conf

That's it!

Installing plugins

  1. Add new plugin to ~/.tmux.conf with set -g @plugin '...'
  2. Press prefix + I (capital i, as in Install) to fetch the plugin.

You're good to go! The plugin was cloned to ~/.tmux/plugins/ dir and sourced.

Uninstalling plugins

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

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

Key bindings

prefix + I

  • Installs new plugins from GitHub or any other git repository
  • Refreshes TMUX environment

prefix + U

  • updates plugin(s)

prefix + alt + u

  • remove/uninstall plugins not on the plugin list

Docs

More advanced features and instructions, regular users probably do not need this:

Tests

Tests for this project run on Travis CI.

When run locally, vagrant is required. Run tests with:

# within project directory
./run_tests

License

MIT

tpm's People

Contributors

ambroisie avatar andyrichardson avatar brandondrew avatar bruno- avatar cclay avatar edwardbetts avatar ehandal avatar franklinyu avatar geoffreyfrogeye avatar gpakosz avatar graham42 avatar jackdrogon avatar javier-lopez avatar laggardkernel avatar larrylv avatar maffblaster avatar majutsushi avatar metakirby5 avatar narfman0 avatar ploth avatar rafalrothenberger avatar rehanguha avatar shouya avatar swivelgames avatar tcyrus avatar weilbith avatar yanskun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tpm's Issues

After Install, "Press ENTER to continue" is incorrect/broken

2015-07-30-101801_660x238_scrot

On my system, anyway, this prompt is incorrect; I have to hit either control-c or q.

Note that while i mention having less aliased to the vim macro, I've tested this without said macro; the behavior is identical.

  • TMux 2.0
  • TPM current as of 2015-07-20 / commit a83329b
  • Arch Linux x64
  • Default Shell: ZSH 5.0.8
  • less aliased to /usr/share/vim/vim74/macros/less.sh

From what I can tell, this code is the "culprit" (or what is called, anyway). That said, I don't think there's really anything broken, just an incorrect comment.

# TMUX messaging is weird. You only get a nice clean pane if you do it with
# `run-shell` command.
echo_message() {
    local message="$1"
    tmux run-shell "echo '$message'"
}

Pull request incoming.

clean_plugins cleared out home directory with missing TMUX_PLUGIN_MANAGER_PATH

I ran clean_plugins outside of Tmux without the TMUX_PLUGIN_MANAGER_PATH variable set, and it completely cleared out the home directory. Apparently it actually tried to remove everything. The output:

Removing "bin"
Removing "boot"
Removing "dev"
Removing "etc"
Removing "home"
Removing "lib"
Removing "lib64"
Removing "lost+found"
Removing "media"
Removing "mnt"
Removing "opt"
Removing "proc"
Removing "root"
Removing "run"
Removing "sbin"
Removing "srv"
Removing "sys"
Removing "tmp"
Removing "usr"
Removing "var"

Error output:

unknown variable: TMUX_PLUGIN_MANAGER_PATH
  "bin" clean fail
  "boot" clean fail
  "dev" clean fail
  "etc" clean fail
  "home" clean fail
  "lib" clean fail
  "lib64" clean fail
  "lost+found" clean fail
  "media" clean fail
  "mnt" clean fail
  "opt" clean fail
  "proc" clean fail
  "root" clean fail
  "run" clean fail
  "sbin" clean fail
  "srv" clean fail
  "sys" clean fail
  "tmp" clean fail
  "usr" clean fail
  "var" clean fail

Luckily this host did not contain anything important, but the behavior is not ideal.

*.tmux file globbing is fragile

The globbing for *.tmux files in source_plugins.sh is pretty fragile. If no matches are found for a glob bash will by default use the glob literally, that is it will look for a file called *.tmux, which is obviously wrong in this case. The ideal fix for this would be to set the nullglob option and use arrays, but that option may have side effects. The simple fix is to just add this line at the top of the for loop:

[ -f "$tmux_file" ] || continue

"set -g @plugin" syntax doesn't work with nonstandard .tmux.conf location

I like to keep my dotfiles in $XDG_CONFIG_HOME, to keep ~ a little cleaner. Accordingly, tmux is aliased to tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf.

Looking through the source, the set -g @plugin syntax seems to work by parsing the tmux conf file manually? And it looks specifically at /etc/tmux.conf and ~/.tmux.conf. Thus whenever I try to install plugins, it shows no plugins to install.

@tpm_plugins syntax still works, so I'll go back to that, but this should probably be accounted for if @plugin is to be the only way going forward. (perhaps a $TMUX_CONF env var? parsing which tmux?)

Error on run

When reloading tmux env, I get:

/Users/stephen/.tmux/plugins/tpm/tpm returned 127

All I can find is that maybe it has to do with file permissions not having execution rights, but I looked at tpm and it has the right permissions.

Background on my setup

Using maximum-awesome's tmux and this is my tmux.local

Remove dependency on Bash

Hi,

I had a quick look on some of the scripts and they have trivial-to-fix bashisms - the same goes for tmux-plugins themselves. Given the fact that tmux is developed on OpenBSD and, apart from it, runs on FreeBSD and NetBSD, removing dependency on Bash would allow us to use tpm and tmux-plugins in general on those platforms without installing Bash just to be able to use them.

I'd be more than happy to help with removing said dependency and making the scripts POSIX-friendly.

Regards,

rjc

Documentation incorrect?

The documentation states that tpm should be cloned from git into the ~/.tmux/plugins directory:

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

However, it states that this should be put at the bottom of the .tmux.conf:

# List of plugins
set -g @plugin 'tmux-plugins/tpm'

Should that line say:

set -g @plugin 'plugins/tpm'

?

plugin "download failed"

Hello, I'm getting the following when trying to install plugins:

Already installed "tpm"
Installing "tmux-sensible"
  "tmux-sensible" download fail
Installing "tmux-scroll-copy-mode"
  "tmux-scroll-copy-mode" download fail

TMUX environment reloaded.

Done, press ESCAPE to continue.

I've noticed that when trying to clone git repos via https that doesn't work on my system. I need to use git clone [email protected]:<repo> instead. Any advice here?
Thank you!

Wiki update suggestion for Installing plugins via the command line only

Hi there, for the "From outside tmux" section, I suggest the following:

# start a server but do not attach to it
tmux start                                                        \; \
   `# create a new session but do not attach to it either`           \
    new -d                                                        \; \
   `# install the plugins`                                           \
    run "~/.tmux/plugins/tpm/scripts/install_plugins.sh"          \; \
   `# kill the session; if no sessions left, it kills the server`    \
    kill-session

I think it is better behaved as it is one compact tmux command. I had problems embedding the originally suggested lines into a script, the output of the rest of my script after install_plugins.sh was simply devoured (?). I also changed kill-server to be kill-session; kill-session only gets rid of the newly started session, not the entire server. Latter is pretty bad, if you already have tmux sessions running.

Sorry about creating a separate issue, I did not find a way to update the wiki.

initialization script returns 127

After placing this

# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins "              \
  tmux-plugins/tpm                 \
  tmux-plugins/tmux-sensible       \
"
# Other examples:
# github_username/plugin_name    \
# [email protected]/user/plugin     \
# [email protected]/user/plugin  \

# initializes TMUX plugin manager
run-shell ~/.tmux/plugins/tpm/tpm

at the end of ~/.tmux.conf and running

$ tmux source-file ~/.tmux.conf

I was getting

'/home/hrvoje/.tmux/plugins/tpm/tpm' returned 127

Tracked it down to a missing folder, /home/hrvoje/.tmux/plugins/tmux-sensible.

After hitting prefix + I, the tmux-sensible was fetched and the problem was gone.

Maybe it would be a good idea to add better error handling for this or to automatically fetch the plugin if the folder doesn't exist?

TPM does not work if sourced via 'if-shell' in a parent .tmux.conf

Maybe this is a tmux issue more than a tpm issue? I am not sure, if I have all of my tpm setup in a file called ~/.tmux.conf.user, which gets sources from the main ~/.tmux.conf, then using 'if-shell' does not work, whereas sourcing directly does. TPM itself does get sourced and the keybindings work. It just does not think any plugins are installed. In other words:

This does NOT work:

~/.tmux.conf:
if-shell '[ -f ~/.tmux.conf.user ]' 'source ~/.tmux.conf.user'

This DOES work:

~/.tmux.conf:
source ~/.tmux.conf.user

My ~/.tmux.conf.user is simply:

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'nhdaly/tmux-scroll-copy-mode'
run '~/.tmux/plugins/tpm/tpm'

tpm no longer working

tpm stopped working for me two days ago, and for the life of me I haven't been able to figure out why. No errors get thrown when I source my .tmux.conf, and everything else in my config works like it used to. None of the plugins are working, however, and the C-I and C-U keybindings for installing/updating them also do nothing. I am using homebrew installed tmux 1.9a. Is anyone else experiencing this?

Any way to get info about installed plugins (ie help?)

Hey! I'm loving tpm, and think it's awesome.... But I find I keep having to go back to the webpage to find out what the keystrokes are for things...

For example, I have the resurrect plugin installed, and couldn't remember what the save and resurrect keystrokes were... I tried the help prefix ? and finally realized I could search for "plugins" and found it, but wondered if there should actually be a nicer "help" page for tpm that showed the docs from the webpages?

Thanks again,

Brad

Install plugin in another folder is not working

I don't want to pollude my home with another hidden folder, so I wanted to install plugin in another folder. Unfortunately, it don't seem to be working as tpm is not loaded and when I try to install other plugins I get "download failed" error.

Here is my tmux.conf file :

set -g @tpm_plugins "              \
  tmux-plugins/tpm                 \
  tmux-plugins/tmux-battery"

# Change plugin install dir
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.dotfiles/tmux/plugins/'

# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell "~/.dotfiles/tmux/plugins/tpm/tpm"

If I don't set the variable TMUX_PLUGIN_MANAFER_PATH everything is working that why I think the problem is related to install in another folder.

Automatically update all plugins without any question/confirmation?

Hi guys,

I wonder if there is anyway I can issue a Bash command or invoke a shell script under the tpm/scripts/ folder that would trigger tpm to update all the tmux plugins but without it asking me to type in "all" or do any form of confirmation?

I have an alias called update in my .bashrc that automatically updates everything in my machine from Vim plugins to Python packages to installed packages without prompt for confirmation. I would like to integrate tpm update into this "automatic update" alias of my .bashrc and wonder if there is anyway I can do that?

If not, I hope this feature would be available soon because AFAIK, Vundle and other Vim plugins managers can be enabled to install Vim plugins automatically from shell script (without confirmation). For example, the following command:

vim +PluginInstall! +PluginUpdate +PluginClean! +qall!

would open Vim and trigger Vundle to Install, Update and Clean all Vim plugins, and then quit Vim (all automatically, without any confirmation needed!!).

Daily, periodic automatic update feature is also present in oh-my-zsh.

Include first-off installation steps from outside tmux

As with vim's NeoBundle, I'd like to be able to trigger a full installation of plugins in an automated way, from outside tmux.

I tried the following without success:

 ~/.tmux/plugins/tpm/scripts/install_plugins.sh   
failed to connect to server: Connection refused
usage: mkdir [-pv] [-m mode] directory ...
failed to connect to server: Connection refused
failed to connect to server: Connection refused
failed to connect to server: Connection refused
failed to connect to server: Connection refused
failed to connect to server: Connection refused
tmux start-server && tmux run-shell ~/.tmux/plugins/tpm/scripts/install_plugins.sh
failed to connect to server: Connection refused

After looking through the test and code haven't been able to craft the right tmux sourcery to get a nice one-off command I can trigger right after installing tmux and tpm to get my full setup in place.

Bootstrap tpm installation

Not really an 'issue', but here's a little snippet I use to bootstrap installation of tpm. My dot-files are all under git so they port nicely to other machines. I don't directly manage tpm or any of the plugins, since tpm does a great job of making them easy to update.

This snippet goes somewhere before the final run <tpm_location>/tpm command:

## Boostrap - install tpm if not already installed
if-shell "test ! -d ${TMUX_PLUGIN_MANAGER_PATH}/tpm" \
         "run-shell 'git clone https://github.com/tmux-plugins/tpm ${TMUX_PLUGIN_MANAGER_PATH}/tpm'"

I get error 127 when trying to install.

Pressing prefix + I gives me this message:

'~/.tmux/plugins/tpm/tpm' returned 127

TMUX environment reloaded.

Done, press ENTER to continue.

I have the prerequisites installed

username > ~ > uname -s
CYGWIN_NT-6.1
username > ~ > which bash
/usr/bin/bash
username > ~ > which dirname
/usr/bin/dirname

This is my tmux.conf

# ctrl-a as prefix instead of ctrl-b
unbind C-b
set -g prefix C-a
# 'C-a C-a' sends C-a keypress to the current window
bind C-a send-prefix

# mouse version >= 2.1
set -g mouse on

# mouse tmux <= 2.0
#set -g mode-mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on

# vi mode
set-window-option -g mode-keys vi

# vim features
unbind [
bind Escape copy-mode
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind C-p run "tmux set-buffer \"$(getclip)\"; tmux paste-buffer"

# restore clear screen
bind C-l send-keys 'C-l'
# restore kill line
bind C-k send-keys 'C-k'
# source this file after changes
bind R source-file ~/.tmux.conf
# source this file after changes
bind s set-window-option synchronize-panes

# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

#### COLOUR (Solarized dark)

# default statusbar colors
set -g status-bg black #base02
set -g status-fg yellow #yellow
set -g status-attr default

# default window title colors
set -g window-status-fg brightblue #base0
set -g window-status-bg default
#set-window-option -g window-status-attr dim

# active window title colors
set -g window-status-current-fg brightred #orange
set -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright

# pane border
set -g pane-border-fg black #base02
set -g pane-active-border-fg brightgreen #base01

# message text
set -g message-bg black #base02
set -g message-fg brightred #orange

# pane number display
set -g display-panes-active-colour blue #blue
set -g display-panes-colour brightred #orange

# clock
set -g clock-mode-colour green #green

# statusline
source-file ~/.tmuxline.conf

# TPM
# list of plugins
set -g @shell_mode 'vi'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

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

TPM seems to be installed but the suggested key bindings don't work for me.

I can't get tpm working. If I run tmux with the suggested tmux.conf file in OS X iTerm and then issue the command tmux source-file ~/.tmux.conf, I get the following output:

temp

But if I then use my prefix (ctrl-a) with the command to install plugins ( I, i.e. uppercase letter i ) like this: ctrl-a-shift-i, nothing happens.

I see lots of reports of problems or incompatibilities when attempting to use the shift key with tmux key bindings, and every one of the many commands I have successfully used with tmux is lower case. I would appreciate some suggestions for syntax to set another binding for this.

Looking at the README for resurrection, I notice that the instructions say one should use prefix + ctrl-s to save. To me this reads as ctrl-a-ctrl-s, which is of course impossible. Do you mean prefix + s?

I would love to get this working, thanks in advance.

Make it work more like bundle

When i want to left a plugin out i wanna be able to open the config comment the line and do a PluginInstall. So the plugin doesn't load.
Also if i really won't use that plugin again i wanna be able to remove it like cleaning its folders/files from my system.

Provide a config option to install plugins via submodules

Hi there,

I'm wondering if you could implement an install script that uses submodules instead of regular git clones. My tmux config is on github and I would like to try plugins and include them in that repo. Without submodules, I would need to reclone every new plugin on separate environments.
Submodules is what I used for the vim plugins I install through pathogen.

Thanks

Tpm for tmux < 1.9?

Hi,

I was wondering if there is a hard reason to make tpm incompatible with older tmux versions, in Ubuntu Precise the default tmux is 1.6-1ubuntu1, I know about ppas with more up to date versions but sometimes I end in systems with older tmux versions.

I reviewed the code and made it work with tmux 1.6 by modifying slightly the tmux invocations and changing set -g with setenv -g, eg.

setenv -g @tpm_plugins "tmux-plugins/tmux-example-plugin"
run-shell "~/.tmux/plugins/tpm/tpm"

If these changes are of any interest I could work on a branch for merging on tpm.

Strange issue with somme command in status bar

Hi,
I'm trying to get my tmux theme as plugin. I'm facing with a strange issue with status bar. Some shell commands won't work if they are put in plugin even if they work in tmux.conf

Let me explain this with an example. If you take following command.

set-option -g status-right "#(awk \'{print $1,$2,$3}\' /proc/loadavg)"

this will work in tmux.conf but not if it's put in a plugin:

tmux set-option -g status-right "#(awk \'{print $1,$2,$3}\' /proc/loadavg)"

I also tried with the following shell command:

grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}'

with the same result.

Others commands like uptime work perfectly fine.

Maybe an issue with awk ?

Odd output on plugin install

I'm getting a strange sequence of characters when I try to install plugins. Aside from this, everything seems to work ok.

[?1000h[?1049h[?1h=[1;24r[34l[34h[?25h[23m[24m[0m[38;5;250m[48;5;234m[?1000l[?1000h[?1000l[?1000h[?1000l[?1000h[?1000l[?1000h[?1000l[0/0]
[?1000l[?1000h[?1000l[?1000h[?1000l[24;80H[K[24;1H[?1l>[?1049l
Already installed "tpm"
Already installed "tmux-sensible"
Already installed "tmux-resurrect"
[?1000h[?1049h[?1h=[1;24r[34l[34h[?25h[23m[24m[0m[38;5;250m[48;5;234m[?1000l[?1000h[?1000l[?1000h[?1000l[?1000h[?1000l[?1000h[?1000l[?1h0l [?1000h [?1000l [?1h
[?1000l[?1000h[?1000l[?1000h[?1000l[24;80H[K[24;1H[?1l>[?1049ll > [?1049l

TMUX environment reloaded.

Done, press ENTER to continue.

Enable non-default conf files

When using a file that isn't /etc/tmux.conf ~/.tmux.conf tpm doesn't load the plugin list. Not sure if it'd be better to include a separate .tmux/tpm.conf file which could include the location of the tmux config file.

download fail when trying to install plugins

Hello,
I get the following message when I press Prefix + I:

Already installed "tpm"
Installing "tmux-sensible"
  "tmux-sensible" download fail
Installing "tmux-resurrect"
  "tmux-resurrect" download fail
Installing "tmux-cpu"
  "tmux-cpu" download fail

 TMUX environment reloaded.

 Done, press ENTER to continue.

I have set export GIT_SSL_NO_VERIFY=true which has resolved issues with git clone in the past, but not this time. How can I debug this issue?

Thanks,
Stathis

tpm conflicts with my keybindings

I have the following keybinding in my .tmux.conf. Before invoking any copycat related command, my keybindings work as usual, but after it looks like messed up. I cannot flip between windows using F11/F12, or even use other defined keybinding such as prefix + r to reload configurations.

# change escape to c-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix

# F11 and F12 to switch between windows
bind -n F11 previous-window
bind -n F12 next-window

# C-c also create new window, like in screen
bind C-c new-window

# (prefix k) to kill window
unbind &
unbind C-k
unbind k
bind k confirm-before -p "Do you really want to kill #W? (y/n)"  kill-window

# use r to reload configuration
unbind r
bind r source-file ~/.tmux.conf \; display "Configuration reloaded!"

# Use Vi mode
setw -g mode-keys vi

# vi like copying
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-pipe "$XCLIP"
bind -t vi-copy Y copy-end-of-line

# use p to paste
bind p paste-buffer

Specify the installation folder manually

First of all thank you for your awesome tmux plugin manager.

I'm using a global dotfiles folder for all my configurations (bash, tmux...) and I would like to have the tpm plugins inside of that folder too, so, it would be great to have a way to specify the installation path manually.

When sourcing .tmux.conf: "failed to connect to server: No such file or directory"

I was following the install instructions, here's exactly what I did:

~ % mkdir ~/.tmux; cd ~/.tmux

~/.tmux % chmod 700 .

~/.tmux % git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# cloned fine

~/.tmux % nano ~/.tmux.conf
# I just added what it said to.
# If it's relevant, ~/.tmux.conf is a symlink to /my/dotfiles/.tmux.conf

everything was cool until this command:

~/.tmux % tmux source ~/.tmux.conf
failed to connect to server: No such file or directory

OS X 10.10.4 (newest), tmux 2.0 (via homebrew).

I'd test to see if the plugins work, but I actually didn't know tmux even had plugins, so I don't know how to do that/what these plugins do.

Getting Download failed on <Prefix + I>

Already installed tpm
Installing tmux-sensible
tmux-sensible download fail
Installing tmux-resurrect
tmux-resurrect download fail
Installing tmux-continuum
tmux-continuum download fail
Installing tmux-yank
tmux-yank download fail

TMUX environment reloaded.

Done, press ENTER to continue.

I also get a connection refused error when running the tpm script manually...

UPDATE: I got it, I was trying to use [email protected]:/$plugin instead of just the names. I think my superfluous colon is what killed it.

Connection refused

Hello,

What's "Connection refused" mean?

" ".tmux.conf" "12 lines, 337 characters written
$
$
$ tmux source-file ~/.tmux.conf
failed to connect to server: Connection refused
$
$ cat .tmux.conf

List of plugins

Supports github_username/repo or full git URLs

set -g @tpm_plugins "
tmux-plugins/tpm
"

Other examples:

github_username/plugin_name \

[email protected]/user/plugin \

[email protected]/user/plugin \

initializes TMUX plugin manager

run-shell ~/.tmux/plugins/tpm/tpm

$ tmux source-file ~/.tmux.conf
failed to connect to server: Connection refused

$ ls -l .tmux/plugins/tpm
total 40
-rw-r--r-- 1 naes naes 1034 Sep 2 22:32 CHANGELOG.md
-rw-r--r-- 1 naes naes 3200 Sep 2 22:32 HOW_TO_PLUGIN.md
-rw-r--r-- 1 naes naes 1067 Sep 2 22:32 LICENSE.md
-rw-r--r-- 1 naes naes 1520 Sep 2 22:32 README.md
-rw-r--r-- 1 naes naes 302 Sep 2 22:32 Vagrantfile
-rwxr-xr-x 1 naes naes 727 Sep 2 22:32 run-tests
drwxr-xr-x 2 naes naes 512 Sep 2 22:32 scripts
drwxr-xr-x 2 naes naes 512 Sep 2 22:32 tests
-rwxr-xr-x 1 naes naes 1306 Sep 2 22:32 tpm
-rw-r--r-- 1 naes naes 268 Sep 2 22:32 vagrant_provisioning.sh

tpm not detecting installed plugins when using custom plugin directory without trailing slash

I am experiencing a bug when tpm can't detect installed plugins nor can't update iself when using custom plugin directory. I am trying to use ~/.config/tmux/plugins directory instead of default ~/.tmux/plugins.

Steps to reproduce:

cd $HOME
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
vim .tmux.conf

I am using the following tmux.conf:

# TPM - Tmux Plugin Manager - https://github.com/tmux-plugins/tpm
# TPM Configuration
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins'

# TPM Plugins
set -g @tpm_plugins '               \
  tmux-plugins/tpm                  \
  tmux-plugins/tmux-sensible        \
'
# Supports `github_username/repo` or full git repo URLs.
# Examples:
# github_username/plugin_name       \
# [email protected]/user/plugin        \
# [email protected]/user/plugin     \

# TPM Init - keep this line at the very bottom of tmux.conf.
run-shell '~/.config/tmux/plugins/tpm/tpm'

After I execute prefix + I for the first time, tpm module always fails. It also does not detect it as already installed

Installing "tpm"
    "tpm" download fail
Installing "tmux-sensible"
    "tmux-sensible" download success

TMUX environment reloaded.

If I execute prefix + I again, now all installed modules will fail at download stage:

Installing "tpm"
    "tpm" download fail
Installing "tmux-sensible"
    "tmux-sensible" download fail

TMUX environment reloaded.

Executing prefix + U does not update anything either.

If I do not use the custom plugin directory setting and clone tpm to ~/.tmux/plugins/tpm then everything works correctly.

Issue with starting tpm

David Melech reported this issue via email:

What about tpm:
Ok, I dont know how, but right now main features works fine with little errors on start and when choice session.
When tmux start first time - he linked to last line in my tmux.conf:
run-shell '~/.tmux/plugins/tpm/tpm' : tmux can't establish current session.
As I said earlier: all features works fine, just notification on the start.

He's running tmux from the hooks branch so I don't know if the problem might be due to that?

Custom Bindings

First - thanks for tpm & all the plugins - it's a great project!

Second - I see that in a couple of plugins setup '@' variables so a user can override the configuring bindings, for example tmux-ressurect:

set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'

However this doesn't seem to be the case with most of the plugins. I use a lot of non-standard bindings in my configuration and would love to override the bindings set by the plugins so they integrate with my config more to my preference. Any chance that this may become standard practice or an API allowing this to happen in all cases might be be possible?

Interested in rewriting tpm and plugins in posix sh

Hi,

Lastly I've been playing with tmux and related plugins managers and tpm seems to me like the most appealing one, looking at the source code I found that most of it is bash scripting. In my opinion bash is a great interactive shell but not so great at executing scripts (unless the scripts use unique and irreplaceable bash features).

I wonder if it's one of these reasons or any other, if there is no reason, then I'd like to implement tpm and plugins in a portable way, would be these changes of any interest?

I read somewhere than it would be better to open a ticket for discussing big changes, so, that's why I started this thread.

/root/.tmux.conf: 107: unknown option: @tpm_plugins

Hi,

For some reason, I can't get TPM to work on my preprod server.
This is the returned message :
/root/.tmux.conf: 107: unknown option: @tpm_plugins

It does this with both synthax :
/root/.tmux.conf: 107: unknown option: @plugin

Here is the part of the .tmux.conf leading to this issue :

104 # Plugins
105 set -g @tpm_plugins '               \
106        tmux-plugins/tpm             \
107 '

Of course, I did git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm, and the plugin folder is where it should be

Travis CI test unexpectedly/erroneously passed w/incorrect text

Earlier, I submitted a pull request (which I since closed) that passed the build test with Travis I don't think it should have.

I had changed some of the output text, but hadn't updated the tests; my more recent pull request has the updated text in the tests, but I'm concenred that the previous one passed.

I had updated the output of some functions to say "q" instead of ENTER - but didn't do so on the tests, which still had ENTER in their "expect" lines.

No plugins run at all?

Hi,

I have tried to install tmux-plugin-manager on both OS X and Arch Linux, both running zsh and either tmux 1.9 or tmux 2.0.

So far I have had no luck with anything, literally anything. None of the key-binding are mapped, and none of the functions work. I have tried manually installing tmux-yank and tmux-open, and then run 'run-shell ~/.tmux/plugins/tmux-open/open.tmux' with no success. Running that command from the shell returns the following output:

unknown command: open
unknown command: open
unknown command: tmux
unknown command: tmux

I don't even know where to begin in debugging this, here is my ~/.tmux.conf file:

set -g default-terminal "screen-256color"
set-option -g default-shell "/usr/local/bin/zsh"
set -g history-limit 100000

# Changing prefix key because I like being able to nest this session
unbind C-d
unbind C-b
set -g prefix C-s

set-option -g default-command "reattach-to-user-namespace -l zsh"
# Plugin Manager
# List of plugins
# Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins '              \
  tmux-plugins/tpm                 \
  tmux-plugins/tmux-sensible       \
  tmux-plugins/tmux-yank           \
  tmux-plugins/tmux-copycat        \
'
# Other examples:
# github_username/plugin_name    \
# [email protected]/user/plugin     \
# [email protected]/user/plugin  \

# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'
run-shell '~/.tmux/plugins/tmux-yank/yank.tmux'
run-shell '~/.tmux/plugins/tmux-open/open.tmux'

Am I missing something obvious?

Use tmux `choose-list`

When tpm opens the prompt where it asks which project to update, it provides a list and the user types in either "all", "", or one of the plugin names. You could totally use tmux's choose-tree command! We already know they are inside tmux, or they couldn't reach this prompt anyway.

This would be very convenient for users because they can then navigate the list with vi/emacs keys, or just type in a number, and not have to type an entire plugin name.

There may be more places where this could be used, but the plugin update prompt is the only one I've found so far. The plugin install page might be able to use command-prompt in a similar vein.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.