What is the correct location to add to my PATH so that it is used across all applications? Currently, my PATH is set in my .zshrc file. However, this prevents GVIM from seeing that path, and prevents calls like :!pdflatex %.

Do I need to be careful where I put the initialisation for NVM (which executes a shell script rather than setting PATH), if I want to call npm build from vim?

I use Kubuntu 20.04 with zsh.


Since you use zsh I'm not sure, but a common file to make changes to PATH is the ~/.profile file. ~/.profile is sourced by the DM and a PATH change made there ought to be effective in the whole session.

| improve this answer | |
  • It's more of a question about Kubuntu than zsh actually. I can source .profile in .zshrc if I need to. – Max Xiong May 25 at 19:59
  • @MaxXiong: I doubt that would help. But I suggest that you try ~/.profile, relogin, and see if it makes a difference. – Gunnar Hjalmarsson May 25 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.