I want to have some program's output colorized as it apperas on terminal.

I know that utility named highlight does the this. But: it has a limited set of built-in language support, and I want coloring for e.g. some work-related daemon logs, for which I already made complex vim syntax files.

I know it is possible to use vim for syntax highlighting as less replacement (vimpager) or directly in terminal (vimcat). But, both these ways vim waits until EOF, and then display colored file -- it's useless for e.g. live daemon testing.

So: is it possible to use vim's syntax highlighting in "live mode"? Or maybe is there an automatic converter from vim's syntax files to highlight's language definitions?

1 Answer 1


maybe this (http://www.vim.org/scripts/script.php?script%5Fid=1714) could be a solution for you

use vim like tail

  • it's not perfect, but it may do the thing after a bit of tweaking (getting rid of vim's window as in vimcat, shortening updatetime for this mode). Thanks.
    – quezak
    Nov 15, 2013 at 19:02
  • found another thread about this superuser.com/questions/117841/get-colors-in-less-command maybe you find something better there
    – konqui
    Nov 24, 2013 at 12:16
  • pygmentize is nice, but there's the same issue as with highlight -- i'd have to write my own syntax file. Since there was no way to simply use my vim syntax file, I ended up writing a bash script with a bunch of sed-ing imitating most important aspects of the mentioned vim syntax file to color piped output from my programs.
    – quezak
    Nov 27, 2013 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.