annotate runtime/syntax/robots.vim @ 6925:30c9301f33ed v7.4.781

patch 7.4.781 Problem: line2byte() returns one less when 'bin' and 'noeol' are set. Solution: Only adjust the size for the last line. (Rob Wu)
author Bram Moolenaar <bram@vim.org>
date Sun, 12 Jul 2015 17:52:57 +0200
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: "Robots.txt" files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Robots.txt files indicate to WWW robots which parts of a web site should not be accessed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Maintainer: Dominique Stéphan (dominique@mggen.com)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " URL: http://www.mggen.com/vim/syntax/robots.zip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Last change: 2001 May 09
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " shut case off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match robotsComment "#.*$" contains=robotsUrl,robotsMail,robotsString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Star * (means all spiders)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match robotsStar "\*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " :
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match robotsDelimiter ":"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " The keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " User-agent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match robotsAgent "^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Disallow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match robotsDisallow "^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Disallow: or User-Agent: and the rest of the line before an eventual comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Some frequent things in comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match robotsUrl "http[s]\=://\S*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match robotsMail "\S*@\S*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region robotsString start=+L\="+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 if version >= 508 || !exists("did_robos_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 let did_robots_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 HiLink robotsComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 HiLink robotsAgent Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink robotsDisallow Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink robotsLine Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink robotsStar Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink robotsDelimiter Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink robotsUrl String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink robotsMail String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink robotsString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 let b:current_syntax = "robots"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " vim: ts=8 sw=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69