tpm icon indicating copy to clipboard operation
tpm copied to clipboard

tpm is installed but the plugins are not fetched

Open bjce opened this issue 4 years ago • 19 comments

Hello

First of all many thanks for the maintenance of the tpm!

I'm using MacOS Catalina 10.15.7 zsh tmux 3.1c

In the README.md of tpm: it is wrtten: Requirements: tmux version 1.9 (or higher), git, bash.

I added the following line in my ~/.tmux.conf file:

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

then entered the command: tmux source ~/.tmux.conf

I then wrote the following in my ~/.tmux.conf file:

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

set -g @continuum-restore 'on'

and then tried

prefix + shift + i

but nothing happened

I also tried the command:

echo $TMUX_PLUGIN_MANAGER_PATH

but there is no output

I tried to read the following link: https://github.com/tmux-plugins/tpm/blob/master/docs/tpm_not_working.md

But unfortunately I could not solve the problem

What am I doing wrong

Many thanks for your answer

bjce avatar Jan 01 '21 18:01 bjce

I have similar problem ..

I put below in ~/.tmux.conf.local

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

set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'

run '~/.tmux/plugins/tpm/tpm'

And source local conf in ~/.tmux.conf

if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'

eromoe avatar Jan 07 '21 05:01 eromoe

Thanks for your comment @eromoe. Before changing my setting: did it work for you?

bjce avatar Jan 07 '21 17:01 bjce

put tpm code in ~/.tmux.conf works for me .

eromoe avatar Jan 08 '21 03:01 eromoe

FYI, I just merged TPM support in Oh my tmux! See instructions there

gpakosz avatar Jan 09 '21 20:01 gpakosz

Well thanks for your comment @eromoe and @gpakosz. I would like to just change the dot files without having to install Oh my tmux!. I tried to implement the advise of eromoe but it didn't work for me or I did something wrong. Here is the content of my .tmux.conf

set -g mouse on

bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi    C-WheelUpPane   send-keys -X halfpage-up
bind -T copy-mode-vi    C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane   send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down

# To copy, left click and drag to highlight text in yellow, 
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"

# List of plugins
## in order to be able to install plugin
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @plugin 'tmux-plugins/tmux-sensible'

## in order to be able to save session between startup 
set -g @plugin 'tmux-plugins/tmux-continuum'
 
#set -g @continuum-restore 'on'

#setw -g mode-mouse on
#set -g mouse-select-window on
run '~/.tmux/plugins/tpm/tpm'

#run-shell ~/clone/path/resurrect.tmux

Here is the output for $ source ~/.tmux.conf

/Users/me/.tmux.conf:7: command not found: bind
/Users/me/.tmux.conf:8: command not found: bind
/Users/me/.tmux.conf:9: command not found: bind
/Users/me/.tmux.conf:10: command not found: bind
/Users/me/.tmux.conf:11: command not found: bind
/Users/me/.tmux.conf:12: command not found: bind
/Users/me/.tmux.conf:13: command not found: bind
/Users/me/.tmux.conf:18: command not found: setw
/Users/me/.tmux.conf:20: command not found: unbind
/Users/me/.tmux.conf:21: command not found: bind-key
/Users/me/.tmux.conf:22: command not found: bind-key
/Users/me/.tmux.conf:37: command not found: run

I also created ~/.tmux.conf.local

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

set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'

run '~/.tmux/plugins/tpm/tpm'

and did again source ~/.tmux.conf

but nothing changed

bjce avatar Jan 12 '21 22:01 bjce

For those who are facing this issue and doesn't wanna install oh-my-tmux, here's a workaround for you. I ran "~/.tmux/plugins/tpm/scripts/install_plugins.sh" source script manually and everything started working as it should.

For those of you who have just now switched to linux, type the following command in your terminal:

cd ~/.tmux/plugins/tpm/scripts && ./install_plugins.sh

stuckinforloop avatar Feb 09 '21 02:02 stuckinforloop

Many many thanks @neel229!! That finally worked!

bjce avatar Feb 09 '21 07:02 bjce

Many many thanks @neel229!! That finally worked!

I myself fixed the error somehow this morning. It has to be a bug with tmux v3.1c

stuckinforloop avatar Feb 09 '21 08:02 stuckinforloop

TL;DR:

  • Check if cat is really cat (which cat)
  • Check if you have both ~/.tmux.conf and ~/.config/tmux/tmux.conf

Long version:

I hit the issue too. After some investigation, I found out that it's a combination of:

  • Having a custom version of cat (lolcat, yes I'm ashamed to admit it)
  • Not having /etc/tmux.conf

This generates an error (/etc/tmux.conf: No such file or directory) which is swallowed by ./install_plugins.sh.

An easy fix in the script could be to call cat twice instead of just once with 2 files. On the other hand, I'd say you deserve it if you alias cat to something else, even something that is supposed to be compatible ...

Another potential issue I found as I looked into the script is that if ~/.config/tmux/tmux.conf exists, then it's used in priority and ~/.tmux.conf is ignored completely.

ColinPitrat avatar May 13 '21 16:05 ColinPitrat

TL;DR:

  • Check if cat is really cat (which cat)
  • Check if you have both ~/.tmux.conf and ~/.config/tmux/tmux.conf

Long version:

I hit the issue too. After some investigation, I found out that it's a combination of:

  • Having a custom version of cat (lolcat, yes I'm ashamed to admit it)
  • Not having /etc/tmux.conf

This generates an error (/etc/tmux.conf: No such file or directory) which is swallowed by ./install_plugins.sh.

An easy fix in the script could be to call cat twice instead of just once with 2 files. On the other hand, I'd say you deserve it if you alias cat to something else, even something that is supposed to be compatible ...

Another potential issue I found as I looked into the script is that if ~/.config/tmux/tmux.conf exists, then it's used in priority and ~/.tmux.conf is ignored completely.

awesome! My problem was caused by ~/.config/tmux/tmux.conf

mzl9039 avatar Oct 14 '21 13:10 mzl9039

@ColinPitrat thx, a lot! You are not alone in the hall of shame! I switched cat for bat :-). Thanks again!

h2ogeek avatar Aug 30 '23 13:08 h2ogeek

Another potential issue I found as I looked into the script is that if ~/.config/tmux/tmux.conf exists, then it's used in priority and ~/.tmux.conf is ignored completely.

Had the same issue. If you use ~/.tmux.conf for your configuration and then install tpm, the default comes with tmux-sensible, which then generates its own config file in ~/.config/tmux/tmux.conf, causing the abovementioned issue

Nibanovic avatar Feb 25 '24 08:02 Nibanovic

For those who are facing this issue and doesn't wanna install oh-my-tmux, here's a workaround for you. I ran "~/.tmux/plugins/tpm/scripts/install_plugins.sh" source script manually and everything started working as it should.

For those of you who have just now switched to linux, type the following command in your terminal:

cd ~/.tmux/plugins/tpm/scripts && ./install_plugins.sh

I installed tmux on my MacbookPro macOS 14 but could not get the plugin installed. After try running this script:

~/.tmux/plugins/tpm/scripts/install_plugins.sh

Everything works. Thanks @stuckinforloop, you saved my day!

linux-root avatar Mar 11 '24 13:03 linux-root