diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-10-29 17:47:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 17:47:27 +0100 |
commit | f5406dfe7772dca82e31f27c042c5718198f0ec8 (patch) | |
tree | 4dd3a3c82b0f4e762d36501f19a652fc6b41ee48 /runtime/doc/if_pyth.txt | |
parent | cf93b5e9f9eea1b08ca8d7cb124265867b2f3bf9 (diff) | |
parent | 6d1827aebc88698b75094029fb0a9e45c1d67632 (diff) | |
download | rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.tar.gz rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.tar.bz2 rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.zip |
Merge #9164 from justinmk/vim-a2a80162deb1
vim-patch: runtime updates
Diffstat (limited to 'runtime/doc/if_pyth.txt')
-rw-r--r-- | runtime/doc/if_pyth.txt | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index e33f89e771..dfa1d6e212 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -705,12 +705,31 @@ Raising SystemExit exception in python isn't endorsed way to quit vim, use: > You can test what Python version is available with: > if has('python') echo 'there is Python 2.x' - elseif has('python3') + endif + if has('python3') echo 'there is Python 3.x' endif Note however, that if Python 2 and 3 are both available, but not loaded, these has() calls will try to load them. +To avoid loading the dynamic library, only check if Vim was compiled with +python support: > + if has('python_compiled') + echo 'compiled with Python 2.x support' + if has('python_dynamic') + echo 'Python 2.x dynamically loaded' + endif + endif + if has('python3_compiled') + echo 'compiled with Python 3.x support' + if has('python3_dynamic') + echo 'Python 3.x dynamically loaded' + endif + endif + +This also tells you whether Python is dynamically loaded, which will fail if +the runtime library cannot be found. + ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: |