Add support for :winpos
[MacVim.git] / runtime / syntax / robots.vim
blob066628bb3c839280d1af8ff4ef3e9c2b3ca9ba45
1 " Vim syntax file
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
10 if version < 600
11     syntax clear
12 elseif exists("b:current_syntax")
13     finish
14 endif
17 " shut case off
18 syn case ignore
20 " Comment
21 syn match  robotsComment        "#.*$" contains=robotsUrl,robotsMail,robotsString
23 " Star * (means all spiders)
24 syn match  robotsStar           "\*"
26 " :
27 syn match  robotsDelimiter      ":"
30 " The keywords
31 " User-agent
32 syn match  robotsAgent          "^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]"
33 " Disallow
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")
45   if version < 508
46     let did_robots_syntax_inits = 1
47     command -nargs=+ HiLink hi link <args>
48   else
49     command -nargs=+ HiLink hi def link <args>
50   endif
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
62   delcommand HiLink
63 endif
66 let b:current_syntax = "robots"
68 " vim: ts=8 sw=2