D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Syntax highlighting cat (vim?)

 

On Mon, 2008-11-10 at 12:50 +0000, Simon Williams wrote:
> Does anyone know if there is such a thing as a cat command which does 
> syntax highlighting? I guess the best thing would be to use vim for 
> this, but is this possible? Can vim be used like cat?

Yes.

$ cat myfile.c | vim -

vim will expect to write the file out, so you need to use :q! to exit.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/


Attachment: signature.asc
Description: This is a digitally signed message part

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html