Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Martin Jambon <martin.jambon@ens-lyon.org>
To: Dario Teixeira <darioteixeira@yahoo.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Syntax highlighting and Ocaml/PHP integration
Date: Wed, 1 Oct 2008 17:27:11 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0810011720190.15614@martin.ec.wink.com> (raw)
In-Reply-To: <650721.83058.qm@web54605.mail.re2.yahoo.com>

On Wed, 1 Oct 2008, Dario Teixeira wrote:

> P.S.  Another (possibly far-fetched) solution is to take advantage of the
>      syntax highlighting capabilities of Vim or Emacs.  Something along
>      the lines of embedding or remotely invoking one of these editors,
>      with the sole purpose of asking them to highlight a text file.
>      Is this even possible?

I've used vim a little bit for my static webpages, here's the result:

http://martin.jambon.free.fr/hello.c.html
http://martin.jambon.free.fr/quine.sh.html
http://martin.jambon.free.fr/micmatch/Makefile.html


The script is:


#!/bin/sh -e

# Usage : any2html <file1> [<file2> ...]
# Requires : vim

[ $# -lt 1 ] && echo "Usage : $0 <fic1> <fic2> ..." && exit 1

while [ -n "$1" ]
do
     file=`basename "$1"`
     cp -f "$1" /tmp
     vim -f +"syn on" +"so \\\$VIMRUNTIME/syntax/2html.vim" +"wq" +"q" /tmp/"$file"
     cp -f /tmp/"$file".html "$1".html
     shift
done
###########################################################


Martin
--
http://mjambon.com/


  reply	other threads:[~2008-10-01 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01 15:21 Dario Teixeira
2008-10-01 15:27 ` Martin Jambon [this message]
2008-10-01 15:27 ` [Caml-list] " Dave Benjamin
2008-10-01 15:45 ` Re : " Adrien
2008-10-01 15:47   ` Re : " Adrien
2008-10-03 15:22 ` Dario Teixeira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0810011720190.15614@martin.ec.wink.com \
    --to=martin.jambon@ens-lyon.org \
    --cc=caml-list@inria.fr \
    --cc=darioteixeira@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox