How do I check a binary exists in the PATH in a Vim plugin?
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.
Check this: :help executable()
精彩评论