[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: vim syntax file? Yesss
- From: Alvise Belotti <nospam@thanx>
- Date: Mon, 25 Jan 1999 15:52:25 +0100
Quoting Engelschall Ralf S . (rse@engelschall.com), on Mon, Jan 25, 1999 at 02:02:46PM +0100:
> On Mon, Jan 25, 1999, Gerfried Fuchs wrote:
>
> > I'm quite new to this list but I hope someone of you can help me
> > anyway. I guess there must be many of wml users out there which are
> > editing with vim. Has anyone of you done a syntax file for vim yet?
> > Maybe just alpha but still better of a simple copy of the html.vim file?
> >
> > That would be great!
>
> Someone wanted to write such a thing a few months ago for Emacs, AFAIK. I
> gave the hint to start with the wml_tags document where all existing WML tags
> are listed.
>
The syntax file _was_ written and posted on debian-www ml (why ? I've noticed
this thing only now...I was pretty sure he posted on wml ml).
It's working fine for me.
File is attached and the following text is from the author (Craig Small):
G'day All,
I have written a syntax file for the wml files for vim. It means that
you too can have an angry gelato look to your wml files when you edit
them in vim.
There may be some problems with it, notice that it also includes the
html and perl syntax files too. Have fun!
- Craig
--
ciao,
Alvise
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-%
% Alvise Belotti Tel. Office: +39(0)49 8274696 %
% E-Mail: alvise@lettere.unipd.it %
% "La Venta" Home Page: http://www.laventa.it %
% PGP Key fingerprint = AD 85 93 92 A9 9C 93 14 9C 6B 3B 15 52 79 B8 BD %
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-%
" Vim syntax file
" Language: WML
" Maintainer: Craig Small <csmall@eye-net.com.au>
" URL: Not yet, something off http://www.eye-net.com.au/~csmall/
" Last change: 10 Dec 1998
" A lot of the web stuff looks like HTML soo we load that first
so $VIM/syntax/html.vim
if !exists("main_syntax")
let main_syntax = 'wml'
endif
" Redfine htmlTag
syn clear htmlTag
syn region htmlTag start=+<[^/<]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition
"
" Add in extra Arguments used by wml
syn keyword htmlTagName contained gfont imgbg imgdot lowsrc
syn keyword htmlTagName contained navbar:define navbar:header
syn keyword htmlTagName contained navbar:footer navbar:prolog
syn keyword htmlTagName contained navbar:epilog navbar:button
syn keyword htmlTagName contained navbar:filter navbar:debug
syn keyword htmlTagName contained navbar:render
syn keyword htmlTagName contained preload rollover
syn keyword htmlTagName contained space hspace vspace over
syn keyword htmlTagName contained ps ds pi ein big sc spaced headline
syn keyword htmlTagName contained ue subheadline zwue verbcode
syn keyword htmlTagName contained isolatin pod sdf text url verbatim
syn keyword htmlTagName contained xtable
syn keyword htmlTagName contained csmap fsview import box
syn keyword htmlTagName contained case:upper case:lower
syn keyword htmlTagName contained grid cell info lang: logo page
syn keyword htmlTagName contained set-var restore
syn keyword htmlTagName contained array:push array:show set-var ifdef
syn keyword htmlTagName contained say m4 symbol dump enter divert
syn keyword htmlTagName contained toc
"
" The wml arguments
syn keyword htmlArg contained adjust background base bdcolor bdspace bdwidth complete copyright created crop direction description domainname eperlfilter file hint imgbase imgstar interchar interline keephr keepindex keywords layout spacing padding nonetscape noscale notag notypo onload oversrc pos select slices style subselected txtcol_select txtcol_normal txtonly via
" The #use things
syn match wmlUsed contained "\s\s*[A-Za-z:]*"
syn match wmlUse "^\s*#\s*use\s*" contains=wmlUsed
syn region wmlBody contained start=+<<+ end=+>>+
syn match wmlLocationed contained "[A-Za-z]*"
syn region wmlLocation start=+<<+ end=+>>+ contains=wmlLocationed
syn match wmlDiverted contained "[A-Za-z][A-Za-z]*"
syn region wmlDivert start=+\.\.+ end=+>>+ contains=wmlDiverted
syn match wmlDivertEnd "<<\.\."
syn match wmlDefineName contained "\s\s*[A-Za-z-]*"
syn region htmlTagName start="\<\(define-tag\|define-region\)" end=">" contains=wmlDefineName
" The perl include stuff
if main_syntax != 'perl'
" Perl script
syn include @wmlPerlScript $VIM/syntax/perl.vim
syn region perlScript start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag
syn match wmlPerlTag contained "</*perl>" contains=wmlPerlTagN
"syn match wmlPerlTag contained "</perl>" contains=wmlPerlTagN
syn keyword wmlPerlTagN contained perl
hi link wmlPerlTag htmlTag
hi link wmlPerlTagN htmlStatement
endif
if main_syntax == "html"
syn sync match wmlHighlight groupthere NONE "</a-zA-Z]"
syn sync match wmlHighlight groupthere perlScript "<perl>"
syn sync match wmlHighlightSkip "^.*['\"].*$"
syn sync minlines=10
endif
if !exists("did_wml_syntax_inits")
let did_wml_syntax_hints = 1
hi link wmlUse Include
hi link wmlUsed String
hi link wmlBody Special
hi link wmlDiverted Label
hi link wmlDivert Delimiter
hi link wmlDivertEnd Delimiter
hi link wmlLocationed Label
hi link wmlLocation Delimiter
hi link wmlDefineName String
endif
let b:current_syntax = "wml"