SlackBuilds Repository

15.0 > Development > source-highlight (3.1.9)

GNU Source-highlight
====================

Source-highlight generates syntax-highlighted documents from source files.
It also provides a C++ highlight library.

Language and output format specifications are loaded dynamically, so new
languages and formats can be added without recompiling.

Usage
-----

Basic example:

source-highlight -s c -f esc sourcefile.c | less -R

View any source file with syntax highlighting through less:

export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
export LESS='-R'

Add those lines to your ~/.bash_profile for permanent effect.

Use -f esc256 instead of -f esc if your terminal supports 256 colors.

Added Languages
---------------

This build adds YAML and Markdown support (upstream bug #62751):

- yaml, yml -> YAML files
- md, mkd, markdown -> Markdown files

Test examples:

curl -s https://raw.githubusercontent.com/git/git/master/.github/workflows/main.yml \
| source-highlight -s yaml -f esc | less -R

curl -s https://raw.githubusercontent.com/git/git/master/README.md \
| source-highlight -s md -f esc | less -R

Homepage
--------

https://www.gnu.org/software/src-highlite/

Maintained by: r1w1s1
Keywords: ,source,code,highlight,syntax,tag,colors,styles
ChangeLog: source-highlight

Homepage:
http://www.gnu.org/software/src-highlite

Source Downloads:
source-highlight-3.1.9.tar.gz (a51266164a537c97860d5d9664614dec)

Download SlackBuild:
source-highlight.tar.gz
source-highlight.tar.gz.asc (FAQ)

(the SlackBuild does not include the source)

Validated for Slackware 15.0

See our HOWTO for instructions on how to use the contents of this repository.

Access to the repository is available via:
ftp git cgit http rsync

© 2006-2026 SlackBuilds.org Project. All rights reserved.
Slackware® is a registered trademark of Patrick Volkerding
Linux® is a registered trademark of Linus Torvalds