Skip to content

paul-ollis/vpe_fold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

 _    ______  ______     ______      __    __
| |  / / __ \/ ____/    / ____/___  / /___/ /
| | / / /_/ / __/      / /_  / __ \/ / __  /
| |/ / ____/ /___     / __/ / /_/ / / /_/ /
|___/_/   /_____/____/_/    \____/_/\__,_/

Welcome to the syntax base folding for Vim.

status:

This is version 0.1.0.

This is just proof of concept code.

Requirements

You will need Vim 9.0 or greater and obviously it will have to have been built with Python 3 support, at least version 3.11.

This also depends on VPE-Sitter and the Vim Python Extensions. Installation using pip or similar will take care of these dpendencies.

Installation

I have only used this on Linux.

Linux

As advised for `VPE`_, it is recommended that you use a virtual environment, hosted within your Vim configuration tree. You may find it useful to read the VPE Linux installation instructions for some background. The following assumes that your Vim configuration directory is $HOME/.vim.

  1. If you do not already have a virtual environment then create one:

    # Make sure you are in your $HOME directory
    python -m venv .vim/lib/python
  2. Activate the virtual environment and install vpe_syntax.

    # Clone thie repository and enter the directory.
    git clone https://github.com/paul-ollis/vpe_fold.git
    cd vpe_fold
    
    # Activate the virtual environment.
    source ~/.vim/lib/python/bin/activate
    # or if using X-destop settings.
    source ~/.config/vim/lib/python/bin/activate
    
    # Install VPE. Using "-e" if you want to edit the code.
    python -m pip install [-e] .
  3. If you did not already have `VPE`_ installed then you will need to perform additional one-off installation of support Vim plugin code. Follow the VPE first installations, steps 2 to 4.

Windows

A user install is recommended.

  1. Install using the command.

    # Clone thie repository and enter the directory.
    git clone https://github.com/paul-ollis/vpe_fold.git
    cd vpe_fold
    
    # Install VPE.
    python -m pip install --user .
  2. If you did not already have `VPE`_ installed then you will need to perform additional one-off installation of support Vim plugin code. Follow the VPE first installations, steps 2 to 4.

Install Tree-sitter parsers

The above steps should install all the direct dependencies of VPE_Syntax, but you will need to separately install parsers for the languages you wish to highlight. Assuming you want to use both supported languages then before you exit the virtual environment do:

python3 -m pip install tree-sitter-python==0.23.6 tree-sitter-c==0.21.4

The Tree-sitter API seems to be somewhat fast moving, so I recommend using the exact versions given above.

You can then deactivate the virtual environment.

deactivate

Using Vpe_Syntax

TODO.

About

Vim syntax based file folding.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages