sponsor Vim development Vim logo Vim Book Ad

VPE-Syntax : Tree-sitter and text propery base syntax highlighting.

 script karma  Rating 0/0, Downloaded by 23  Comments, bugs, improvements  Vim wiki

created by
Paul Ollis
 
script type
utility
 
description
News

  The download no provides a Python installation script.

  Windows is now supported

Requirements

  VPE-Syntax requires a minimum of Vim 9 and Python 3.11

  VPE-Syntax has only been tested on Linux and Windows.

What it is all about

  This is a Vim Python plugin that is implemented on top of VPE, see:

      https://www.vim.org/scripts/script.php?script_id=5905

  It provides text property based syntax highlighting using Tree-sitter to
  rapidly parse your code. Please see the README at:
  https://github.com/paul-ollis/vpe_syntax for additional notes.

Status

  This is an alpha release that only provides support files to highlight Python
  and C code. It is in some ways a prototype, but I am using day-to-day for
  Python code.

  Documentation is much needed, which will probably be the main focus of the
  next release.

Tree-sitter and Vim

  Tree-sitter is a relatively new library specifically designed to provide code
  parsing that is fast enough to be used as the basis of editor tooling. See::

    https://tree-sitter.github.io/tree-sitter/

  Tree-sitter has been discussed as a possible way to overcome certain
  limitations of Vim's built-in sytax highlighting mechanism
  (https://github.com/vim/vim/issues/9087). While NeoVim has made strides in
  this area, a native Vim implementation still seems some way off.

  In the meantime, this plugin may provide a way for Vim users to experience the
  improvements possible with a Tree-sitter approach. It has been designed to be
  performant - the current version seems to handle files of around 25,000 lines
  well. It can even handle the 262,858 line sqlite3.c file referred to the above
  issue 9087. On my PC it takes about 4 seconds to initially highlight the
  entire file, but Vim remains responsive at all times.

  Improvements in scalability may be made in future releases.

Source code

  The source code is hosted at https://github.com/paul-ollis/vpe_syntax.
  You can raise bugs or feature requests there. Pull requests are also welcome.
 
install details
The download provides a Python installation script that automates installation. See the README in the download for instructions.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vpe-syntax-0.1.1.zip 0.1.1 2025-09-11 9.0 Paul Ollis This download now provides a Python installation script.
vpe-syntax-stub-0.1.0.zip 0.1.0 2025-09-10 9.0 Paul Ollis Initial upload
ip used for rating: 216.73.216.138

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github