tpm icon indicating copy to clipboard operation
tpm copied to clipboard

Plugins not installed/loaded when sourced from separate file?

Open aravinda0 opened this issue 9 years ago • 2 comments

I have the following .tmux.conf where I source stuff from helper files.

source-file $DOTFILES_PATH/tmux/config/mappings.conf
source-file $DOTFILES_PATH/tmux/config/plugins.conf

And the following plugins.conf

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

run $DOTFILES_PATH/tmux/tpm/tpm

I can see that my mappings are sourced, since they work in my tmux. It also seems like plugins.conf is also sourced, since I can use tpm shortcuts. However, when try to run the installer (<prefix>+I), installation is invoked but no plugins are listed as being detected.

If I move the contents of plugin.conf into my .tmux.conf, the plugins are detected and everything seems to work.

Can you help me understand this issue?

aravinda0 avatar Jan 30 '17 17:01 aravinda0

On the off chance that someone else like me spends a few hours looking for this problem. Make sure the line. run $DOTFILES_PATH/tmux/tpm/tpm

is in the bottom of your .tmux.conf

I'm pretty sure it has to do with where the run command is run from so it has issues figuring out the path.

mkarpoff avatar Feb 02 '18 02:02 mkarpoff

I am having this issue also. The proposed solution worked for me but is not in line with how my shell config is laid out.

I use a shared dot file repo that allows for user customization via a ~/.tmux.conf sourced ~/.tmux.conf.user. So the only way I can use TPM is to pollute the shared dot file ~/.tmux.conf with my personal plugin preferences and that is not an acceptable solution.

daxgames avatar Feb 04 '19 17:02 daxgames