|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*builtin.txt* For Vim version 9.1. Last change: 2024 Nov
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -467,9 +467,9 @@ prop_type_get({name} [, {props}])
|
|
| 467 |
prop_type_list([{props}]) List get list of property types
|
| 468 |
pum_getpos() Dict position and size of pum if visible
|
| 469 |
pumvisible() Number whether popup menu is visible
|
| 470 |
-
py3eval({expr})
|
| 471 |
-
pyeval({expr})
|
| 472 |
-
pyxeval({expr})
|
| 473 |
rand([{expr}]) Number get pseudo-random number
|
| 474 |
range({expr} [, {max} [, {stride}]])
|
| 475 |
List items from {expr} to {max}
|
|
@@ -8127,9 +8127,14 @@ pumvisible() *pumvisible()*
|
|
| 8127 |
Return type: |Number|
|
| 8128 |
|
| 8129 |
|
| 8130 |
-
py3eval({expr})
|
| 8131 |
Evaluate Python expression {expr} and return its result
|
| 8132 |
converted to Vim data structures.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8133 |
Numbers and strings are returned as they are (strings are
|
| 8134 |
copied though, Unicode strings are additionally converted to
|
| 8135 |
'encoding').
|
|
@@ -8141,15 +8146,17 @@ py3eval({expr}) *py3eval()*
|
|
| 8141 |
|
| 8142 |
Can also be used as a |method|: >
|
| 8143 |
GetExpr()->py3eval()
|
|
|
|
| 8144 |
<
|
| 8145 |
Return type: any, depending on {expr}
|
| 8146 |
|
| 8147 |
{only available when compiled with the |+python3| feature}
|
| 8148 |
|
| 8149 |
*E858* *E859*
|
| 8150 |
-
pyeval({expr})
|
| 8151 |
Evaluate Python expression {expr} and return its result
|
| 8152 |
converted to Vim data structures.
|
|
|
|
| 8153 |
Numbers and strings are returned as they are (strings are
|
| 8154 |
copied though).
|
| 8155 |
Lists are represented as Vim |List| type.
|
|
@@ -8165,9 +8172,10 @@ pyeval({expr}) *pyeval()*
|
|
| 8165 |
|
| 8166 |
{only available when compiled with the |+python| feature}
|
| 8167 |
|
| 8168 |
-
pyxeval({expr})
|
| 8169 |
Evaluate Python expression {expr} and return its result
|
| 8170 |
converted to Vim data structures.
|
|
|
|
| 8171 |
Uses Python 2 or 3, see |python_x| and 'pyxversion'.
|
| 8172 |
See also: |pyeval()|, |py3eval()|
|
| 8173 |
|
| 1 |
+
*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 06
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 467 |
prop_type_list([{props}]) List get list of property types
|
| 468 |
pum_getpos() Dict position and size of pum if visible
|
| 469 |
pumvisible() Number whether popup menu is visible
|
| 470 |
+
py3eval({expr}[, {locals}]) any evaluate |python3| expression
|
| 471 |
+
pyeval({expr}[, {locals}]) any evaluate |Python| expression
|
| 472 |
+
pyxeval({expr}[, {locals}]) any evaluate |python_x| expression
|
| 473 |
rand([{expr}]) Number get pseudo-random number
|
| 474 |
range({expr} [, {max} [, {stride}]])
|
| 475 |
List items from {expr} to {max}
|
| 8127 |
Return type: |Number|
|
| 8128 |
|
| 8129 |
|
| 8130 |
+
py3eval({expr}[, {locals}]) *py3eval()*
|
| 8131 |
Evaluate Python expression {expr} and return its result
|
| 8132 |
converted to Vim data structures.
|
| 8133 |
+
If a {locals} |Dictionary| is given, it defines set of local
|
| 8134 |
+
variables available in the expression. The keys are variable
|
| 8135 |
+
names and the values are the variable values. |Dictionary| and
|
| 8136 |
+
|List| values are referenced, and may be updated by the
|
| 8137 |
+
expression (as if |python-bindeval| was used).
|
| 8138 |
Numbers and strings are returned as they are (strings are
|
| 8139 |
copied though, Unicode strings are additionally converted to
|
| 8140 |
'encoding').
|
| 8146 |
|
| 8147 |
Can also be used as a |method|: >
|
| 8148 |
GetExpr()->py3eval()
|
| 8149 |
+
'b",".join(l)'->py3eval({'l': ['a', 'b', 'c']})
|
| 8150 |
<
|
| 8151 |
Return type: any, depending on {expr}
|
| 8152 |
|
| 8153 |
{only available when compiled with the |+python3| feature}
|
| 8154 |
|
| 8155 |
*E858* *E859*
|
| 8156 |
+
pyeval({expr}[, {locals}]) *pyeval()*
|
| 8157 |
Evaluate Python expression {expr} and return its result
|
| 8158 |
converted to Vim data structures.
|
| 8159 |
+
For {locals} see |py3eval()|.
|
| 8160 |
Numbers and strings are returned as they are (strings are
|
| 8161 |
copied though).
|
| 8162 |
Lists are represented as Vim |List| type.
|
| 8172 |
|
| 8173 |
{only available when compiled with the |+python| feature}
|
| 8174 |
|
| 8175 |
+
pyxeval({expr}[, {locals}]) *pyxeval()*
|
| 8176 |
Evaluate Python expression {expr} and return its result
|
| 8177 |
converted to Vim data structures.
|
| 8178 |
+
For {locals} see |py3eval()|.
|
| 8179 |
Uses Python 2 or 3, see |python_x| and 'pyxversion'.
|
| 8180 |
See also: |pyeval()|, |py3eval()|
|
| 8181 |
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*if_pyth.txt* For Vim version 9.1. Last change: 2024
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Paul Moore
|
|
@@ -201,6 +201,10 @@ vim.eval(str) *python-eval*
|
|
| 201 |
[{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': ~
|
| 202 |
'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}] ~
|
| 203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
vim.bindeval(str) *python-bindeval*
|
| 205 |
Like |python-eval|, but returns special objects described in
|
| 206 |
|python-bindeval-objects|. These python objects let you modify (|List|
|
|
@@ -741,6 +745,10 @@ To facilitate bi-directional interface, you can use |pyeval()| and |py3eval()|
|
|
| 741 |
functions to evaluate Python expressions and pass their values to Vim script.
|
| 742 |
|pyxeval()| is also available.
|
| 743 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 744 |
The Python value "None" is converted to v:none.
|
| 745 |
|
| 746 |
==============================================================================
|
| 1 |
+
*if_pyth.txt* For Vim version 9.1. Last change: 2024 Nov 06
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Paul Moore
|
| 201 |
[{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': ~
|
| 202 |
'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}] ~
|
| 203 |
|
| 204 |
+
NOTE: In vim9script, local variables in def functions are not visible
|
| 205 |
+
to to python evaluations. To pass local variables to python evaluations,
|
| 206 |
+
use the {locals} dict when calling |py3eval()| and friends.
|
| 207 |
+
|
| 208 |
vim.bindeval(str) *python-bindeval*
|
| 209 |
Like |python-eval|, but returns special objects described in
|
| 210 |
|python-bindeval-objects|. These python objects let you modify (|List|
|
| 745 |
functions to evaluate Python expressions and pass their values to Vim script.
|
| 746 |
|pyxeval()| is also available.
|
| 747 |
|
| 748 |
+
You can inject local variables into the evaluation using the optional {locals}
|
| 749 |
+
dict. This can be particularly useful in vim9script where vim.eval
|
| 750 |
+
|python-eval| will not find locals in a def func.
|
| 751 |
+
|
| 752 |
The Python value "None" is converted to v:none.
|
| 753 |
|
| 754 |
==============================================================================
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*options.txt* For Vim version 9.1. Last change: 2024 Nov
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -3515,7 +3515,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|
| 3515 |
Only alphanumeric characters, '-' and '_' can be used.
|
| 3516 |
|
| 3517 |
*'fillchars'* *'fcs'*
|
| 3518 |
-
'fillchars' 'fcs' string (default "vert:|,fold:-,eob
|
| 3519 |
global or local to window |global-local|
|
| 3520 |
Characters to fill the statuslines, vertical separators and special
|
| 3521 |
lines in the window.
|
| 1 |
+
*options.txt* For Vim version 9.1. Last change: 2024 Nov 06
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 3515 |
Only alphanumeric characters, '-' and '_' can be used.
|
| 3516 |
|
| 3517 |
*'fillchars'* *'fcs'*
|
| 3518 |
+
'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~,lastline:@")
|
| 3519 |
global or local to window |global-local|
|
| 3520 |
Characters to fill the statuslines, vertical separators and special
|
| 3521 |
lines in the window.
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*version9.txt* For Vim version 9.1. Last change: 2024 Nov
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -41606,6 +41606,7 @@ Changed~
|
|
| 41606 |
- an interactive tutor plugin has been included |vim-tutor-mode|, can be
|
| 41607 |
started via |:Tutor|
|
| 41608 |
- improve the |vimtutor| and add a second chapter for more advanced tips
|
|
|
|
| 41609 |
|
| 41610 |
*added-9.2*
|
| 41611 |
Added ~
|
| 1 |
+
*version9.txt* For Vim version 9.1. Last change: 2024 Nov 06
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 41606 |
- an interactive tutor plugin has been included |vim-tutor-mode|, can be
|
| 41607 |
started via |:Tutor|
|
| 41608 |
- improve the |vimtutor| and add a second chapter for more advanced tips
|
| 41609 |
+
- allow to pass local Vim script variables to python interpreter |py3eval()|
|
| 41610 |
|
| 41611 |
*added-9.2*
|
| 41612 |
Added ~
|