summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-04-24 14:07:45 +0200
committerBram Moolenaar <Bram@vim.org>2013-04-24 14:07:45 +0200
commit230bb3f09d1661cb8da3ef64406270bd3e61aae3 (patch)
tree9c493ef3d30ffc39af2a540fa14bd64b563351b3 /runtime
parent335e0b69744ededb907fb9167f72ac84e37e1304 (diff)
downloadvim-git-230bb3f09d1661cb8da3ef64406270bd3e61aae3.tar.gz
updated for version 7.3.911v7.3.911
Problem: Python: Access to Vim variables is not so easy. Solution: Define vim.vars and vim.vvars. (ZyX)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/if_pyth.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index 575002319..96fd1247d 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -237,6 +237,11 @@ vim.current *python-current*
"current range". A range is a bit like a buffer, but with all access
restricted to a subset of lines. See |python-range| for more details.
+vim.vars *python-vars*
+vim.vvars *python-vvars*
+ Dictionary-like objects holding dictionaries with global (|g:|) and
+ vim (|v:|) variables respectively. Identical to `vim.bindeval("g:")`,
+ but faster.
Output from Python *python-output*
Vim displays all Python code output in the Vim message area. Normal
@@ -307,6 +312,7 @@ Examples (assume b is the current buffer) >
:py n = len(b) # number of lines
:py (row,col) = b.mark('a') # named mark
:py r = b.range(1,5) # a sub-range of the buffer
+ :py b.vars["foo"] = "bar" # assign b:foo variable
==============================================================================
4. Range objects *python-range*
@@ -354,6 +360,9 @@ Window attributes are:
This is a tuple, (row,col).
height (read-write) The window height, in rows
width (read-write) The window width, in columns
+ vars (read-only) The window |w:| variables. Attribute is
+ unassignable, but you can change window
+ variables this way
The height attribute is writable only if the screen is split horizontally.
The width attribute is writable only if the screen is split vertically.