Mercurial > vim
annotate runtime/syntax/asn.vim @ 31802:ddbc560ecc41 v9.0.1233
patch 9.0.1233: search() loops forever if "skip" is TRUE for all matches
Commit: https://github.com/vim/vim/commit/3d79f0a4309995956bd8889940cca22f7a15881d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 22 20:14:26 2023 +0000
patch 9.0.1233: search() loops forever if "skip" is TRUE for all matches
Problem: search() loops forever if "skip" is TRUE for all matches.
Solution: Keep the position of the first match.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 Jan 2023 21:15:03 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: ASN.1 | |
3 " Maintainer: Claudio Fleiner <claudio@fleiner.com> | |
4 " URL: http://www.fleiner.com/vim/syntax/asn.vim | |
3854 | 5 " Last Change: 2012 Oct 05 |
7 | 6 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3854
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3854
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
3854 | 12 let s:cpo_save = &cpo |
13 set cpo&vim | |
14 | |
7 | 15 " keyword definitions |
16 syn keyword asnExternal DEFINITIONS BEGIN END IMPORTS EXPORTS FROM | |
17 syn match asnExternal "\<IMPLICIT\s\+TAGS\>" | |
18 syn match asnExternal "\<EXPLICIT\s\+TAGS\>" | |
19 syn keyword asnFieldOption DEFAULT OPTIONAL | |
20 syn keyword asnTagModifier IMPLICIT EXPLICIT | |
21 syn keyword asnTypeInfo ABSENT PRESENT SIZE UNIVERSAL APPLICATION PRIVATE | |
22 syn keyword asnBoolValue TRUE FALSE | |
23 syn keyword asnNumber MIN MAX | |
24 syn match asnNumber "\<PLUS-INFINITY\>" | |
25 syn match asnNumber "\<MINUS-INFINITY\>" | |
26 syn keyword asnType INTEGER REAL STRING BIT BOOLEAN OCTET NULL EMBEDDED PDV | |
27 syn keyword asnType BMPString IA5String TeletexString GeneralString GraphicString ISO646String NumericString PrintableString T61String UniversalString VideotexString VisibleString | |
28 syn keyword asnType ANY DEFINED | |
29 syn match asnType "\.\.\." | |
30 syn match asnType "OBJECT\s\+IDENTIFIER" | |
31 syn match asnType "TYPE-IDENTIFIER" | |
32 syn keyword asnType UTF8String | |
33 syn keyword asnStructure CHOICE SEQUENCE SET OF ENUMERATED CONSTRAINED BY WITH COMPONENTS CLASS | |
34 | |
35 " Strings and constants | |
36 syn match asnSpecial contained "\\\d\d\d\|\\." | |
37 syn region asnString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=asnSpecial | |
38 syn match asnCharacter "'[^\\]'" | |
39 syn match asnSpecialCharacter "'\\.'" | |
40 syn match asnNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" | |
41 syn match asnLineComment "--.*" | |
42 syn match asnLineComment "--.*--" | |
43 | |
44 syn match asnDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 contains=asnType | |
45 syn match asnBraces "[{}]" | |
46 | |
47 syn sync ccomment asnComment | |
48 | |
49 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3854
diff
changeset
|
50 " Only when an item doesn't have highlighting yet |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
51 hi def link asnDefinition Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
52 hi def link asnBraces Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
53 hi def link asnStructure Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
54 hi def link asnBoolValue Boolean |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
55 hi def link asnSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
56 hi def link asnString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
57 hi def link asnCharacter Character |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link asnSpecialCharacter asnSpecial |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link asnNumber asnValue |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link asnComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link asnLineComment asnComment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link asnType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
63 hi def link asnTypeInfo PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
64 hi def link asnValue Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link asnExternal Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
66 hi def link asnTagModifier Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
67 hi def link asnFieldOption Type |
7 | 68 |
3854 | 69 let &cpo = s:cpo_save |
70 unlet s:cpo_save | |
7 | 71 let b:current_syntax = "asn" |
72 | |
73 " vim: ts=8 |