From 1a51524ad540da00736027313cd89747c86c1690 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Oct 2018 14:02:09 +0100 Subject: vim-patch:40962ec9c0e7 Update runtime files. https://github.com/vim/vim/commit/40962ec9c0e7b8699e101182b06ddd39dc0e1212 --- runtime/doc/if_pyth.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'runtime/doc/if_pyth.txt') diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index e33f89e771..62fd4cc8d4 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: -- cgit From 733b4ce0339f2fdcdb0db67717fc090dcfecf250 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Oct 2018 14:05:39 +0100 Subject: vim-patch:7254067ee970 Update runtime files. https://github.com/vim/vim/commit/7254067ee970686cc3ff4a1effc3e49e9192a5c1 --- runtime/doc/if_pyth.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/doc/if_pyth.txt') diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 62fd4cc8d4..384406150f 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -717,14 +717,14 @@ 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 + 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 + if has('python3_dynamic') + echo 'Python 3.x dynamically loaded' endif endif -- cgit From 07fdbba9d0a5cce9d466c36fbbaa9fe1cdeb1428 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Oct 2018 09:50:39 +0100 Subject: vim-patch:91f84f6e11cd Update runtime files. https://github.com/vim/vim/commit/91f84f6e11cd879d43d651c0903d85bff95f0716 --- runtime/doc/if_pyth.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc/if_pyth.txt') diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 384406150f..dfa1d6e212 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -732,4 +732,4 @@ 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: -- cgit