2 " Language: "Robots.txt" files
3 " Robots.txt files indicate to WWW robots which parts of a web site should not be accessed.
4 " Maintainer: Dominique Stéphan (dominique@mggen.com)
5 " URL: http://www.mggen.com/vim/syntax/robots.zip
6 " Last change: 2001 May 09
8 " For version 5.x: Clear all syntax items
9 " For version 6.x: Quit when a syntax file was already loaded
12 elseif exists("b:current_syntax")
21 syn match robotsComment "#.*$" contains=robotsUrl,robotsMail,robotsString
23 " Star * (means all spiders)
24 syn match robotsStar "\*"
27 syn match robotsDelimiter ":"
32 syn match robotsAgent "^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]"
34 syn match robotsDisallow "^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]"
36 " Disallow: or User-Agent: and the rest of the line before an eventual comment
37 synt match robotsLine "\(^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]\|^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]\):[^#]*" contains=robotsAgent,robotsDisallow,robotsStar,robotsDelimiter
39 " Some frequent things in comments
40 syn match robotsUrl "http[s]\=://\S*"
41 syn match robotsMail "\S*@\S*"
42 syn region robotsString start=+L\="+ skip=+\\\\\|\\"+ end=+"+
44 if version >= 508 || !exists("did_robos_syntax_inits")
46 let did_robots_syntax_inits = 1
47 command -nargs=+ HiLink hi link <args>
49 command -nargs=+ HiLink hi def link <args>
52 HiLink robotsComment Comment
53 HiLink robotsAgent Type
54 HiLink robotsDisallow Statement
55 HiLink robotsLine Special
56 HiLink robotsStar Operator
57 HiLink robotsDelimiter Delimiter
58 HiLink robotsUrl String
59 HiLink robotsMail String
60 HiLink robotsString String
66 let b:current_syntax = "robots"