Mercurial > vim
annotate runtime/syntax/prolog.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 2eb30f341e8d |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: PROLOG | |
203 | 3 " Maintainers: Thomas Koehler <jean-luc@picard.franken.de> |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
4 " Last Change: 2013 May 23 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
5 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim |
7 | 6 |
7 " There are two sets of highlighting in here: | |
8 " If the "prolog_highlighting_clean" variable exists, it is rather sparse. | |
9 " Otherwise you get more highlighting. | |
10 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
11 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
12 if exists("b:current_syntax") |
7 | 13 finish |
14 endif | |
15 | |
16 " Prolog is case sensitive. | |
17 syn case match | |
18 | |
19 " Very simple highlighting for comments, clause heads and | |
20 " character codes. It respects prolog strings and atoms. | |
21 | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
22 syn region prologCComment start=+/\*+ end=+\*/+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
23 syn match prologComment +%.*+ |
7 | 24 |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
25 syn keyword prologKeyword module meta_predicate multifile dynamic |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
26 syn match prologCharCode +0'\\\=.+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
27 syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
28 syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
29 syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause |
7 | 30 |
31 if !exists("prolog_highlighting_clean") | |
32 | |
33 " some keywords | |
34 " some common predicates are also highlighted as keywords | |
35 " is there a better solution? | |
36 syn keyword prologKeyword abolish current_output peek_code | |
37 syn keyword prologKeyword append current_predicate put_byte | |
38 syn keyword prologKeyword arg current_prolog_flag put_char | |
39 syn keyword prologKeyword asserta fail put_code | |
40 syn keyword prologKeyword assertz findall read | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
41 syn keyword prologKeyword at_end_of_stream float read_term |
7 | 42 syn keyword prologKeyword atom flush_output repeat |
43 syn keyword prologKeyword atom_chars functor retract | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
44 syn keyword prologKeyword atom_codes get_byte set_input |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
45 syn keyword prologKeyword atom_concat get_char set_output |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
46 syn keyword prologKeyword atom_length get_code set_prolog_flag |
7 | 47 syn keyword prologKeyword atomic halt set_stream_position |
48 syn keyword prologKeyword bagof integer setof | |
49 syn keyword prologKeyword call is stream_property | |
50 syn keyword prologKeyword catch nl sub_atom | |
51 syn keyword prologKeyword char_code nonvar throw | |
52 syn keyword prologKeyword char_conversion number true | |
53 syn keyword prologKeyword clause number_chars unify_with_occurs_check | |
54 syn keyword prologKeyword close number_codes var | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
55 syn keyword prologKeyword compound once write |
7 | 56 syn keyword prologKeyword copy_term op write_canonical |
57 syn keyword prologKeyword current_char_conversion open write_term | |
58 syn keyword prologKeyword current_input peek_byte writeq | |
59 syn keyword prologKeyword current_op peek_char | |
60 | |
61 syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|=" | |
62 syn match prologAsIs "===\|\\===\|<=\|=>" | |
63 | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
64 syn match prologNumber "\<[0123456789]*\>'\@!" |
7 | 65 syn match prologCommentError "\*/" |
66 syn match prologSpecialCharacter ";" | |
67 syn match prologSpecialCharacter "!" | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
68 syn match prologSpecialCharacter ":-" |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
69 syn match prologSpecialCharacter "-->" |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
70 syn match prologQuestion "?-.*\." contains=prologNumber |
7 | 71 |
72 | |
73 endif | |
74 | |
203 | 75 syn sync maxlines=50 |
7 | 76 |
77 | |
78 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
79 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
80 command -nargs=+ HiLink hi def link <args> |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
81 |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
82 " The default highlighting. |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
83 HiLink prologComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
84 HiLink prologCComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
85 HiLink prologCharCode Special |
7 | 86 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
87 if exists ("prolog_highlighting_clean") |
7 | 88 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
89 HiLink prologKeyword Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
90 HiLink prologClauseHead Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
91 HiLink prologClause Normal |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
92 |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
93 else |
7 | 94 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
95 HiLink prologKeyword Keyword |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
96 HiLink prologClauseHead Constant |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
97 HiLink prologClause Normal |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
98 HiLink prologQuestion PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
99 HiLink prologSpecialCharacter Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
100 HiLink prologNumber Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
101 HiLink prologAsIs Normal |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
102 HiLink prologCommentError Error |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
103 HiLink prologAtom String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
104 HiLink prologString String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
105 HiLink prologOperator Operator |
7 | 106 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
107 endif |
7 | 108 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
109 delcommand HiLink |
7 | 110 |
111 let b:current_syntax = "prolog" | |
112 | |
113 " vim: ts=8 |