annotate runtime/syntax/change.vim @ 9481:7520696c14b0 v7.4.2021

commit https://github.com/vim/vim/commit/19ff9bf454b7492be64dd87aaf0830fa7961871e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 10 19:03:57 2016 +0200 patch 7.4.2021 Problem: Still too many buf_valid() calls. Solution: Make au_new_curbuf a bufref. Use bufref_valid() in more places.
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Jul 2016 19:15:06 +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: WEB Changes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Andreas Scherer <andreas.scherer@pobox.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: April 25, 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Details of the change mechanism of the WEB and CWEB languages can be found
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " in the articles by Donald E. Knuth and Silvio Levy cited in "web.vim" and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " "cweb.vim" respectively.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syn clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " We distinguish two groups of material, (a) stuff between @x..@y, and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " (b) stuff between @y..@z. WEB/CWEB ignore everything else in a change file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn region changeFromMaterial start="^@x.*$"ms=e+1 end="^@y.*$"me=s-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn region changeToMaterial start="^@y.*$"ms=e+1 end="^@z.*$"me=s-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 if version >= 508 || !exists("did_change_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 let did_change_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 HiLink changeFromMaterial String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 HiLink changeToMaterial Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 let b:current_syntax = "change"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " vim: ts=8