Skip to main content

Friendly Python interface for interacting with Vim.

Project description

pre-commit Code style: black

A friendly interface for interacting with Vim using Python.

Installation

pip install vimlib

Recommended: Using your chosen virtual environment, that's been setup for Vim, or Neovim, to use, install vimlib using that.

Examples:

  • ~/vimfiles/.venv/bin/pip.exe install --upgrade vimlib
  • cd ~/vimfiles && poetry install vimlib

Usage

from pyvim import current


# String with the current, or last, selection.
# Support basic, linewise, and block visual highlights
selection = pyvim.current.selection

# Boolean. Check if a highlight group is available
has_highlight = 'MyHighlightGroup' in pyvim.current.highlights

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vimlib-0.0.4.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

vimlib-0.0.4-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page