Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I check a binary exists in the PATH in a Vim plugin?

Tags:

vim

I'm writing a Vim plugin. I need to call a binary which should be in the PATH. But I want to display an error message if its not. Whats the best way to find out if the binary is in the PATH?

I'm hoping to find a solution that is portable across different operating systems. But that doesn't seem very easy and I'll settle for a solution that works on unix/linux/mac.

like image 350
Eric Johnson Avatar asked Mar 10 '11 08:03

Eric Johnson


1 Answers

Check this: :help executable()

like image 58
Raimondi Avatar answered Nov 01 '22 07:11

Raimondi