On May 12, Peng Yu (Peng Yu) wrote:
I'm wondering if there is a way to print the syntax highlighted text to stdout using ansi color. I was told the following trick to print the output to an html file. But I'd prefer the output to stdout.
Yes, but let us do better than that and use all the available colors and text attributes, making the output to stdout identical to what you see in your vim session. I have this [0] aliased to cat, and when I don't want the highlighting, I just do a \cat file or =cat file instead. Here's a screenshot of what it looks like: http://devel.japh.se/vim-cat/vim_cat.png [0]: https://github.com/trapd00r/utils/blob/master/v -- Magnus Woldrich [email protected], [email protected] irc: scp1 on freenode uri: http://japh.se -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
