Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add another solution to tpm_not_working.md #291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/tpm_not_working.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,39 @@ set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin"
```

before any `run-shell`/`run` commands in `~/.tmux.conf`.

<hr />

> '~/.tmux/plugins/tpm/tpm' returned error code 127 (on Linux, either WSL or any distro, with tmux installed via Homebrew or APT)
> or maybe Mac (don't have one to test)

This issue may be caused by one of the following:
1. You forgot to clone the repo so simply
```.sh
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
```
2. Incorrect `.gitconfig` configuration. If your `.gitconfig` file contains the following:
```.gitconfig
[core]
autocrlf = true
```
This setting may cause issues by changing line endings from LF to CRLF, which is not desirable in Linux/Mac Enviroments generally. To fix this,
change it to `input`:
Open the `.gitconfig` file by running:
```.sh
git config --global -e
```
If the above command doesn't work, set your preferred editor first:
```.sh
git config --global core.editor "nvim" # or vim, or your preferred editor
```
Then, update the `.gitconfig` file:
```.gitconfig
[core]
autocrlf = input #Keep it like that forever, Except if you are on Windows
```
Save the configuration, and then run:
```.sh
rm -rf ~/.tmux/plugins && git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
```
After completing these steps, exit and restart tmux. Press `<leader>I` (uppercase `I` for Install) to reload and resolve the issue.