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.
Asked
Active
Viewed 3,119 times
5

Alter Lagos
- 1,159
2 Answers
1
Yes, of course:
pygmentize -g /file/to/show | less -r

kiri
- 28,246
- 16
- 81
- 118
-
Maybe I wasn't enough clear in my question, but I was expecting to replace
less
forpygmentize
.Thanks anyway – Alter Lagos Jan 16 '14 at 00:30
-R
option, less probably won't show the colours, but the raw escape codes – drevicko Feb 22 '16 at 16:17