_ ______ ______ ______ __ __ | | / / __ \/ ____/ / ____/___ / /___/ / | | / / /_/ / __/ / /_ / __ \/ / __ / | |/ / ____/ /___ / __/ / /_/ / / /_/ / |___/_/ /_____/____/_/ \____/_/\__,_/
Welcome to the syntax base folding for Vim.
| status: | This is version 0.1.0. This is just proof of concept code. |
|---|
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.
I have only used this on 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.
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/pythonActivate 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] .
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.
A user install is recommended.
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 .
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.
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
TODO.