Skip to main content
 _    ______  ______
| |  / / __ \/ ____/
| | / / /_/ / __/     The Vim Python Extensions
| |/ / ____/ /___
|___/_/   /_____/

Welcome to the Vim Python Extensions (VPE).

status:

This is version 0.7.3.

The Version 0.7 line is intended to be the stepping stone for version 1.0.

Although it has not yet reached a version 1.0 release, I make heavy, daily use of VPE within my Vim environment without problems.

While the API should be considered unstable, it has actually proven largely stable, with only a few, minor incompatible changes since version 0.1.

Introduction

VPE provides a toolkit of modules and classes aimed at making it easier to extend Vim using modern Pythonic code. The headline features are:

  • Instead of using the standard vim module you can use the vpe.vim object, which provides a greatly extended superset of the vim module’s features.

  • Other extensions that, along with vpe.vim, just make it easier to write Pythonic plugin code for Vim.

Installation

Read the installation instructions online.

Using VPE

This is just a brief introduction. For more complete documentation see the online documentation.

The quickest way to start using VPE is to import the vim object:

from vpe import vim

The vim object is an instance of the Vim class, which is designed as a drop in replacement for Vim’s standard python-vim module, but with a number of enhancements, including:

  • Most of Vim’s functions appear as members, for example:

    vim.cursor(4, 10)            # Position cursor at row 4, column 10.
    m = vim.execute('messages')  # Get all the recent Vim messages.
  • The attributes buffers, current, options, tabpages, vars, vvars and windows provide enhanced access to the corresponding Vim objects. For example vim.current.buffer provides a Buffer instance in place of Vim’s standard python-buffer. This supports things like easier access to buffer variables, more efficient buffer modification and per-buffer metadata storage.

  • The Vim registers are available using the registers attribute.

  • When errors occur a VimError is raised, which provides a better breakdown of the error (code and command are available as attributes). This is a subclass of vim.error so existing code that catches vim.error still works.

Features

This is a brief list of VPE’s features.

  • The vpe.vim object - a much enhanced replacement for the standard vim module (python-vim). This is an instance of the Vim class.

  • Classes Window, Buffer, TabPage are enhanced wrappers around the standard (vim) versions.

  • Key mappings can cleanly be set up to invoke Python functions and methods.

  • User commands can cleanly be set up to invoke Python functions and methods. VPE also provides support for subcommands and automatic command line tab-key completion.

  • Timers can cleanly be set up to invoke Python functions and methods.

  • Autocmd Events can cleanly be set up to invoke Python functions and methods.

  • A built in log, which is useful for debugging plugin code.

    • The log can be displayed in a dedicated Vim buffer.

    • Printing can be redirected to the log.

    • You can create your own plugin specific log(s).

  • Pythonic support for using popup windows.

  • Pythonic support for channels.

Metadata

Release files for vpe 0.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vpe 0.7.3
File Size Uploaded Provenance
vpe-0.7.3.tar.gz 228.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vpe 0.7.3
File Interpreter ABI Platform
vpe-0.7.3-py3-none-any.whl Python 3 none any Details

Total release size: 418.4 kB

Release files / vpe-0.7.3.tar.gz

Download URL vpe-0.7.3.tar.gz
Size 228.6 kB
Tags Source
SHA-256 checksum
How to use checksums
473f1daaea87b41653c0fcd52ba8433bc437a824c44cd40e6fdd4e69a2c3cf99
BLAKE2b-256 checksum
How to use checksums
69a0205d79152c433573c651c9e8b9c9b3661705ab73898e7584bcc3f6351d24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / vpe-0.7.3-py3-none-any.whl

Download URL vpe-0.7.3-py3-none-any.whl
Size 189.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea15b55798e76545c1554d89b69756a399448a2dc76b5785e0670044275ec94a
BLAKE2b-256 checksum
How to use checksums
1e6e57d5535cb4d8069a2050e072b40b32033b51a2afeb2ec3f35ec5f6454a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Security for vpe 0.7.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page