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