summaryrefslogtreecommitdiffstats
path: root/runtime/doc/options.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-28 16:06:38 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-28 16:06:38 +0100
commitf42dd3c3901ea0ba38e67a616aea9953cae81b8d (patch)
tree3626ca40161dbfaa5e72a4dbeaa46b24480ddc8c /runtime/doc/options.txt
parent0c0590d9827cb07a33c1552cb3558b94bddcb4dc (diff)
patch 8.0.0251: not easy to select Python 2 or 3v8.0.0251
Problem: It is not so easy to write a script that works with both Python 2 and Python 3, even when the Python code works with both. Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata)
Diffstat (limited to 'runtime/doc/options.txt')
-rw-r--r--runtime/doc/options.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index a9a0cc4835..4e9490223b 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5789,6 +5789,34 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
+ *'pyxversion'* *'pyx'*
+'pyxversion' 'pyx' number (default depends on the build)
+ global
+ {not in Vi}
+ {only available when compiled with the |+python| or
+ the |+python3| feature}
+ Specifies the python version used for pyx* functions and commands
+ |python_x|. The default value is as follows:
+
+ Compiled with Default ~
+ |+python| and |+python3| 0
+ only |+python| 2
+ only |+python3| 3
+
+ Available values are 0, 2 and 3.
+ If 'pyxversion' is 0, it is set to 2 or 3 after the first execution of
+ any python2/3 commands or functions. E.g. `:py` sets to 2, and `:py3`
+ sets to 3. `:pyx` sets it to 3 if Python 3 is available, otherwise sets
+ to 2 if Python 2 is available.
+ See also: |has-pythonx|
+
+ If Vim is compiled with only |+python| or |+python3| setting
+ 'pyxversion' has no effect. The pyx* functions and commands are
+ always the same as the compiled version.
+
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+
*'quoteescape'* *'qe'*
'quoteescape' 'qe' string (default "\")
local to buffer