annotate runtime/syntax/flexwiki.vim @ 32974:d46f974fd69e

runtime: Fix typos in various files Commit: https://github.com/vim/vim/commit/3fc7a7e44abda6505ccd39a6d067db6e5173cbf6 Author: Viktor Sz?pe <viktor@szepe.net> Date: Wed Aug 23 21:20:00 2023 +0200 runtime: Fix typos in various files closes: https://github.com/vim/vim/issues/12836 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Viktor Sz?pe <viktor@szepe.net>
author Christian Brabandt <cb@256bit.org>
date Thu, 24 Aug 2023 07:33:27 +0200
parents 43efa4f5a8ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
846
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
1 " Vim syntax file
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
2 " Language: FlexWiki, http://www.flexwiki.com/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
3 " Maintainer: George V. Reilly <george@reilly.org>
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
4 " Home: http://www.georgevreilly.com/vim/flexwiki/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
5 " Other Home: http://www.vim.org/scripts/script.php?script_id=1529
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
6 " Author: George V. Reilly
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
7 " Filenames: *.wiki
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
8 " Last Change: Wed Apr 26 11:00 PM 2006 P
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
9 " Version: 0.3
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
10
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
11 " Note: The horrible regexps were reverse-engineered from
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
12 " FlexWikiCore\EngineSource\Formatter.cs, with help from the Regex Analyzer
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
13 " in The Regulator, http://regulator.sourceforge.net/ .NET uses Perl-style
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
14 " regexes, which use a different syntax than Vim (fewer \s).
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
15 " The primary test case is FlexWiki\FormattingRules.wiki
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
16
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 846
diff changeset
17 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 846
diff changeset
18 if exists("b:current_syntax")
846
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
19 finish
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
20 endif
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
21
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
22 " A WikiWord (unqualifiedWikiName)
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
23 syntax match flexwikiWord /\%(_\?\([A-Z]\{2,}[a-z0-9]\+[A-Za-z0-9]*\)\|\([A-Z][a-z0-9]\+[A-Za-z0-9]*[A-Z]\+[A-Za-z0-9]*\)\)/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
24 " A [bracketed wiki word]
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
25 syntax match flexwikiWord /\[[[:alnum:]\s]\+\]/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
26
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
27 " text: "this is a link (optional tooltip)":http://www.microsoft.com
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
28 " TODO: check URL syntax against RFC
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
29 syntax match flexwikiLink `\("[^"(]\+\((\([^)]\+\))\)\?":\)\?\(https\?\|ftp\|gopher\|telnet\|file\|notes\|ms-help\):\(\(\(//\)\|\(\\\\\)\)\+[A-Za-z0-9:#@%/;$~_?+-=.&\-\\\\]*\)`
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
30
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
31 " text: *strong*
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
32 syntax match flexwikiBold /\(^\|\W\)\zs\*\([^ ].\{-}\)\*/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
33 " '''bold'''
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
34 syntax match flexwikiBold /'''\([^'].\{-}\)'''/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
35
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
36 " text: _emphasis_
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
37 syntax match flexwikiItalic /\(^\|\W\)\zs_\([^ ].\{-}\)_/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
38 " ''italic''
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
39 syntax match flexwikiItalic /''\([^'].\{-}\)''/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
40
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
41 " ``deemphasis``
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
42 syntax match flexwikiDeEmphasis /``\([^`].\{-}\)``/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
43
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
44 " text: @code@
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
45 syntax match flexwikiCode /\(^\|\s\|(\|\[\)\zs@\([^@]\+\)@/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
46
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
47 " text: -deleted text-
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
48 syntax match flexwikiDelText /\(^\|\s\+\)\zs-\([^ <a ]\|[^ <img ]\|[^ -].*\)-/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
49
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
50 " text: +inserted text+
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
51 syntax match flexwikiInsText /\(^\|\W\)\zs+\([^ ].\{-}\)+/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
52
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
53 " text: ^superscript^
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
54 syntax match flexwikiSuperScript /\(^\|\W\)\zs^\([^ ].\{-}\)^/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
55
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
56 " text: ~subscript~
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
57 syntax match flexwikiSubScript /\(^\|\W\)\zs\~\([^ ].\{-}\)\~/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
58
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
59 " text: ??citation??
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
60 syntax match flexwikiCitation /\(^\|\W\)\zs??\([^ ].\{-}\)??/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
61
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
62 " Emoticons: must come after the Textilisms, as later rules take precedence
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
63 " over earlier ones. This match is an approximation for the ~70 distinct
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
64 " patterns that FlexWiki knows.
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
65 syntax match flexwikiEmoticons /\((.)\|:[()|$@]\|:-[DOPS()\]|$@]\|;)\|:'(\)/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
66
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
67 " Aggregate all the regular text highlighting into flexwikiText
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
68 syntax cluster flexwikiText contains=flexwikiItalic,flexwikiBold,flexwikiCode,flexwikiDeEmphasis,flexwikiDelText,flexwikiInsText,flexwikiSuperScript,flexwikiSubScript,flexwikiCitation,flexwikiLink,flexwikiWord,flexwikiEmoticons
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
69
32974
d46f974fd69e runtime: Fix typos in various files
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
70 " single-line WikiProperties
846
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
71 syntax match flexwikiSingleLineProperty /^:\?[A-Z_][_a-zA-Z0-9]\+:/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
72
32974
d46f974fd69e runtime: Fix typos in various files
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
73 " TODO: multi-line WikiProperties
846
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
74
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
75 " Header levels, 1-6
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
76 syntax match flexwikiH1 /^!.*$/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
77 syntax match flexwikiH2 /^!!.*$/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
78 syntax match flexwikiH3 /^!!!.*$/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
79 syntax match flexwikiH4 /^!!!!.*$/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
80 syntax match flexwikiH5 /^!!!!!.*$/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
81 syntax match flexwikiH6 /^!!!!!!.*$/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
82
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
83 " <hr>, horizontal rule
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
84 syntax match flexwikiHR /^----.*$/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
85
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
86 " Formatting can be turned off by ""enclosing it in pairs of double quotes""
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
87 syntax match flexwikiEscape /"".\{-}""/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
88
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
89 " Tables. Each line starts and ends with '||'; each cell is separated by '||'
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
90 syntax match flexwikiTable /||/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
91
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
92 " Bulleted list items start with one or tabs, followed by whitespace, then '*'
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
93 " Numeric list items start with one or tabs, followed by whitespace, then '1.'
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
94 " Eight spaces at the beginning of the line is equivalent to the leading tab.
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
95 syntax match flexwikiList /^\(\t\| \{8}\)\s*\(\*\|1\.\).*$/ contains=@flexwikiText
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
96
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
97 " Treat all other lines that start with spaces as PRE-formatted text.
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
98 syntax match flexwikiPre /^[ \t]\+[^ \t*1].*$/
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
99
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
100
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
101 " Link FlexWiki syntax items to colors
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
102 hi def link flexwikiH1 Title
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
103 hi def link flexwikiH2 flexwikiH1
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
104 hi def link flexwikiH3 flexwikiH2
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
105 hi def link flexwikiH4 flexwikiH3
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
106 hi def link flexwikiH5 flexwikiH4
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
107 hi def link flexwikiH6 flexwikiH5
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
108 hi def link flexwikiHR flexwikiH6
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
109
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
110 hi def flexwikiBold term=bold cterm=bold gui=bold
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
111 hi def flexwikiItalic term=italic cterm=italic gui=italic
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
112
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
113 hi def link flexwikiCode Statement
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
114 hi def link flexwikiWord Underlined
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
115
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
116 hi def link flexwikiEscape Todo
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
117 hi def link flexwikiPre PreProc
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
118 hi def link flexwikiLink Underlined
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
119 hi def link flexwikiList Type
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
120 hi def link flexwikiTable Type
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
121 hi def link flexwikiEmoticons Constant
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
122 hi def link flexwikiDelText Comment
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
123 hi def link flexwikiDeEmphasis Comment
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
124 hi def link flexwikiInsText Constant
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
125 hi def link flexwikiSuperScript Constant
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
126 hi def link flexwikiSubScript Constant
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
127 hi def link flexwikiCitation Constant
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
128
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
129 hi def link flexwikiSingleLineProperty Identifier
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
130
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
131 let b:current_syntax="FlexWiki"
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
132
db44f7b81373 updated for version 7.0f03
vimboss
parents:
diff changeset
133 " vim:tw=0: