NAME
vim-syntax-to-shb - Convert Vim syntax files to .shb syntax data files
SYNOPSIS
vim-syntax-to-shb [OPTIONS] FILE_OR_DIR [FILE_OR_DIR ...]
# Convert a single file
vim-syntax-to-shb /usr/share/vim/vim91/syntax/perl.vim
# Convert multiple files to a specific output directory
vim-syntax-to-shb --output-dir share/syntax /usr/share/vim/vim91/syntax/perl.vim \
/usr/share/vim/vim91/syntax/python.vim
# Convert all .vim files in a directory
vim-syntax-to-shb --output-dir share/syntax /usr/share/vim/vim91/syntax/
# Override the language name
vim-syntax-to-shb --language bash /usr/share/vim/vim91/syntax/sh.vim
OPTIONS
- --output-dir DIR
-
Directory to write .shb files (default: current directory).
- --language NAME
-
Override the language name in the output file. Only valid with a single input file.
- --verbose
-
Print progress messages to stderr.
- -h, --help
-
Show this help message and exit.
DESCRIPTION
vim-syntax-to-shb reads Vim .vim syntax files and produces .shb (Syntax Highlight Basic) data files suitable for use by Syntax::Highlight::Basic::Parser at runtime.
The converter extracts:
syn keywordstatements →[keyword:GROUP]sectionssyn matchstatements →[match:GROUP]sectionssyn regionstatements →[region:GROUP]sectionshi def linkstatements → group resolution map
Vim regex syntax is converted to Perl regex syntax where possible. Patterns that are too complex to convert are skipped with a warning.
VERSION
0.1.0
AUTHOR
Sandor Patocs
LICENSE
This script is licensed under the same terms as Perl itself.
SEE ALSO
Syntax::Highlight::Basic::Parser
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 925:
Non-ASCII character seen before =encoding in '→'. Assuming UTF-8