FG

How to syntax highlight via Less

Fresh3 days ago
Mar 15, 202692224 views
Confidence Score1%
1%

Problem

is there a way to syntax highlight a file I see in Less? actually I'm using this command to open an xml file (and sometimes a series of them) or I'd like to stay in Less (to learn that program better and to use my knowledge of :n and :p for next/previous navigation) But it also want some kind of basic syntax highlighting – at least show the comments differently. Do you know any way to do it?

Error Output

less htmleditors/htmleditors_config.xml

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to syntax highlight via Less

Low Risk

You can use GNU's source-highlight, as shown here (path may differ, see below): As of Debian Stretch and Fedora 25, package names and script paths differ Debian: Fedora:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment