6

I think it would be very nice if I can check whether current vim was compiled with python support, instead of having error message popping out every time vim is launched.

Can this check be done in vimscript?

Note that running shell wouldn't work if multiple vim's are installed and user launch one of them:

vim --version | grep -q '\+python\>' 

It would be considered as a better approach if it could be checked within vimscript alone.

1 Answer 1

12

How about

if has('python') ... endif 

See :help has() and :help feature-list at list item 1 and /python.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.