2

I want to use vim editor as an external tool in intellij idea. I mapped a Ctrl-U combination to opening the current file with vim. Then I want to use the fugitive plugin, which is a wrapper over git and uses the git binary. But the vim opened from idea cannot locate the git binary. When I start the vim from shell, it can locate the vim binary.

/bin/bash: git: command not found
ryskajakub
  • 6,351
  • 8
  • 45
  • 75

1 Answers1

1

When launched from the IDE, vim doesn't seem to inherit the environment variables (like PATH) that you set in your ~/*rc. You could try toprepend the correct PATH to your command. Something like:

PATH=/path/to/git:$PATH /usr/bin/gvim
romainl
  • 186,200
  • 21
  • 280
  • 313
  • there is only a space for entering the command in the External tools dialog in idea. I cannot preset some variables in the form. – ryskajakub Nov 08 '13 at 12:21