Tuesday, May 14, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 3115  / 3 Years ago, sat, may 8, 2021, 1:27:33

I found pygmentize thanks to this answer, but it would be great if it could be used to highlight text with less or maybe replace the command.

Is there a way to do that? Thanks in advance.


More From » syntax-highlighting

 Answers
3

It was easier than I expected. I must to use:



export LESSOPEN='|pygmentize %s'

[#27450] Sunday, May 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
impisaso

Total Points: 423
Total Questions: 106
Total Answers: 104

Location: Virgin Islands (U.S.)
Member since Tue, Feb 2, 2021
3 Years ago
;