annotate runtime/syntax/lout.vim @ 7034:e668b160ac68 v7.4.830

commit https://github.com/vim/vim/commit/b341dda575899458f7075614dcedf0a80ee9d080 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 25 12:56:31 2015 +0200 patch 7.4.830 Problem: Resetting 'encoding' when doing ":set all&" causes problems. (Bjorn Linse) Display is not updated. Solution: Do not reset 'encoding'. Do a full redraw.
author Christian Brabandt <cb@256bit.org>
date Tue, 25 Aug 2015 17:20:25 +0200
parents 94601b379f38
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: Lout
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
4 " Last Change: So 12 Feb 2012 15:15:03 CET
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Filenames: *.lout,*.lt
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
6 " URL: http://www.cvjb.de/comp/vim/lout.vim
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
7
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
8 " $Id: lout.vim,v 1.4 2012/02/12 15:16:17 bruessow Exp $
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Lout: Basser Lout document formatting system.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
12 " Many Thanks to...
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
13 "
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
14 " 2012-02-12:
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
15 " Thilo Six <T.Six at gmx dot de> send a patch for cpoptions.
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
16 " See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
17
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
18
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
27 let s:cpo_save=&cpo
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
28 set cpo&vim
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
29
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Lout is case sensitive
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Synchronization, I know it is a huge number, but normal texts can be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " _very_ long ;-)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn sync lines=1000
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " Characters allowed in keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " I don't know if 128-255 are allowed in ANS-FORHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 if version >= 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 setlocal iskeyword=@,48-57,.,@-@,_,192-255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 set iskeyword=@,48-57,.,@-@,_,192-255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Some special keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword loutTodo contained TODO lout Lout LOUT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword loutDefine def macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " Some big structures
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword loutKeyword @Begin @End @Figure @Tab
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword loutKeyword @Book @Doc @Document @Report
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword loutKeyword @Introduction @Abstract @Appendix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword loutKeyword @Chapter @Section @BeginSections @EndSections
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " All kind of Lout keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match loutFunction '\<@[^ \t{}]\+\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Braces -- Don`t edit these lines!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match loutMBraces '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match loutIBraces '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match loutBBrace '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match loutBIBraces '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match loutHeads '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Unmatched braces.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match loutBraceError '}'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " End of multi-line definitions, like @Document, @Report and @Book.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match loutEOmlDef '^//$'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " Grouping of parameters and objects.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn region loutObject transparent matchgroup=Delimiter start='{' matchgroup=Delimiter end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " The NULL object has a special meaning
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword loutNULL {}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn region loutComment start='\#' end='$' contains=loutTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " Double quotes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region loutSpecial start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 " ISO-LATIN-1 characters created with @Char, or Adobe symbols
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " created with @Sym
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match loutSymbols '@\(\(Char\)\|\(Sym\)\)\s\+[A-Za-z]\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " Include files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match loutInclude '@IncludeGraphic\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn region loutInclude start='@\(\(SysInclude\)\|\(IncludeGraphic\)\|\(Include\)\)\s*{' end='}'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " Tags
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match loutTag '@\(\(Tag\)\|\(PageMark\)\|\(PageOf\)\|\(NumberOf\)\)\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn region loutTag start='@Tag\s*{' end='}'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " Equations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match loutMath '@Eq\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn region loutMath matchgroup=loutMBraces start='@Eq\s*{' matchgroup=loutMBraces end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 " Fonts
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match loutItalic '@I\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn region loutItalic matchgroup=loutIBraces start='@I\s*{' matchgroup=loutIBraces end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match loutBold '@B\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn region loutBold matchgroup=loutBBraces start='@B\s*{' matchgroup=loutBBraces end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match loutBoldItalic '@BI\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=loutBIBraces end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 " 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
111 if version >= 508 || !exists("did_lout_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 let did_lout_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " The default methods for highlighting. Can be overrriden later.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 HiLink loutTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 HiLink loutDefine Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 HiLink loutEOmlDef Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 HiLink loutFunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 HiLink loutBraceError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 HiLink loutNULL Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 HiLink loutComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 HiLink loutSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 HiLink loutSymbols Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 HiLink loutInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 HiLink loutKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 HiLink loutTag Tag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 HiLink loutMath Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 " HiLink Not really needed here, but I think it is more consistent.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 HiLink loutMBraces loutMath
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 hi loutItalic term=italic cterm=italic gui=italic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 HiLink loutIBraces loutItalic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 hi loutBold term=bold cterm=bold gui=bold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 HiLink loutBBraces loutBold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 HiLink loutBIBraces loutBoldItalic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 hi loutHeadings term=bold cterm=bold guifg=indianred
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 HiLink loutHeads loutHeadings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 let b:current_syntax = "lout"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
150 let &cpo=s:cpo_save
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
151 unlet s:cpo_save
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
152
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 " vim:ts=8:sw=4:nocindent:smartindent: