Mercurial > vim
comparison runtime/doc/options.txt @ 10722:7598ce51bf2a v8.0.0251
patch 8.0.0251: not easy to select Python 2 or 3
commit https://github.com/vim/vim/commit/f42dd3c3901ea0ba38e67a616aea9953cae81b8d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 28 16:06:38 2017 +0100
patch 8.0.0251: not easy to select Python 2 or 3
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Jan 2017 16:15:04 +0100 |
parents | 9a75c8a1b8b1 |
children | 523cd59d6db0 |
comparison
equal
deleted
inserted
replaced
10721:9177c4f6a229 | 10722:7598ce51bf2a |
---|---|
5787 DYNAMIC_PYTHON3_DLL, which was specified at compile time. | 5787 DYNAMIC_PYTHON3_DLL, which was specified at compile time. |
5788 Environment variables are expanded |:set_env|. | 5788 Environment variables are expanded |:set_env|. |
5789 This option cannot be set from a |modeline| or in the |sandbox|, for | 5789 This option cannot be set from a |modeline| or in the |sandbox|, for |
5790 security reasons. | 5790 security reasons. |
5791 | 5791 |
5792 *'pyxversion'* *'pyx'* | |
5793 'pyxversion' 'pyx' number (default depends on the build) | |
5794 global | |
5795 {not in Vi} | |
5796 {only available when compiled with the |+python| or | |
5797 the |+python3| feature} | |
5798 Specifies the python version used for pyx* functions and commands | |
5799 |python_x|. The default value is as follows: | |
5800 | |
5801 Compiled with Default ~ | |
5802 |+python| and |+python3| 0 | |
5803 only |+python| 2 | |
5804 only |+python3| 3 | |
5805 | |
5806 Available values are 0, 2 and 3. | |
5807 If 'pyxversion' is 0, it is set to 2 or 3 after the first execution of | |
5808 any python2/3 commands or functions. E.g. `:py` sets to 2, and `:py3` | |
5809 sets to 3. `:pyx` sets it to 3 if Python 3 is available, otherwise sets | |
5810 to 2 if Python 2 is available. | |
5811 See also: |has-pythonx| | |
5812 | |
5813 If Vim is compiled with only |+python| or |+python3| setting | |
5814 'pyxversion' has no effect. The pyx* functions and commands are | |
5815 always the same as the compiled version. | |
5816 | |
5817 This option cannot be set from a |modeline| or in the |sandbox|, for | |
5818 security reasons. | |
5819 | |
5792 *'quoteescape'* *'qe'* | 5820 *'quoteescape'* *'qe'* |
5793 'quoteescape' 'qe' string (default "\") | 5821 'quoteescape' 'qe' string (default "\") |
5794 local to buffer | 5822 local to buffer |
5795 {not in Vi} | 5823 {not in Vi} |
5796 The characters that are used to escape quotes in a string. Used for | 5824 The characters that are used to escape quotes in a string. Used for |