Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/web.vim @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76efa0be13f1 |
---|---|
1 " Vim syntax file | |
2 " Language: WEB | |
3 " Maintainer: Andreas Scherer <andreas.scherer@pobox.com> | |
4 " Last Change: April 30, 2001 | |
5 | |
6 " Details of the WEB language can be found in the article by Donald E. Knuth, | |
7 " "The WEB System of Structured Documentation", included as "webman.tex" in | |
8 " the standard WEB distribution, available for anonymous ftp at | |
9 " ftp://labrea.stanford.edu/pub/tex/web/. | |
10 | |
11 " For version 5.x: Clear all syntax items | |
12 " For version 6.x: Quit when a syntax file was already loaded | |
13 if version < 600 | |
14 syntax clear | |
15 elseif exists("b:current_syntax") | |
16 finish | |
17 endif | |
18 | |
19 " Although WEB is the ur-language for the "Literate Programming" paradigm, | |
20 " we base this syntax file on the modern superset, CWEB. Note: This shortcut | |
21 " may introduce some illegal constructs, e.g., CWEB's "@c" does _not_ start a | |
22 " code section in WEB. Anyway, I'm not a WEB programmer. | |
23 if version < 600 | |
24 source <sfile>:p:h/cweb.vim | |
25 else | |
26 runtime! syntax/cweb.vim | |
27 unlet b:current_syntax | |
28 endif | |
29 | |
30 " Replace C/C++ syntax by Pascal syntax. | |
31 syntax include @webIncludedC <sfile>:p:h/pascal.vim | |
32 | |
33 " Double-@ means single-@, anywhere in the WEB source (as in CWEB). | |
34 " Don't misinterpret "@'" as the start of a Pascal string. | |
35 syntax match webIgnoredStuff "@[@']" | |
36 | |
37 let b:current_syntax = "web" | |
38 | |
39 " vim: ts=8 |