Module vpe.core¶
Enhanced module for using Python3 in Vim.
This provides the Vim class, which is a wrapper around Vim’s built-in vim module. It is intended that a Vim instance can be uses as a replacement for the vim module. For example:
from vpe import vim
# Now use 'vim' as an extended version of the *vim* module.
# ...
This was developed for Vim version 8.1. It will probably work for Vim 8.0, but is very unlikely to be compatible with earlier versions. I plan that future versions of vpe will be backwardly compatible with version 8.1.
Callback¶
-
class
core.
Callback
(...)¶ Callback( func, *, py_args=(), py_kwargs={}, vim_args=(), pass_bytes=False, info=())
Wrapper for a function to be called from Vim.
Parameters
- func
The function to be invoked.
- py_args
Positional arguments for the function.
- py_kwargs
Keyword arguments for the function.
- vim_args
Positional arguments for helper Vim function.
- pass_bytes
If true then vim byte-strings will not be decoded to Python strings.
- info
Additional info to store with the callback. TODO: Only really for MapCallback!
Methods
Class methods