Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Lout | |
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 | 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 | 9 " |
10 " Lout: Basser Lout document formatting system. | |
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 | 19 " For version 5.x: Clear all syntax items |
20 " For version 6.x: Quit when a syntax file was already loaded | |
21 if version < 600 | |
22 syntax clear | |
23 elseif exists("b:current_syntax") | |
24 finish | |
25 endif | |
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 | 30 " Lout is case sensitive |
31 syn case match | |
32 | |
33 " Synchronization, I know it is a huge number, but normal texts can be | |
34 " _very_ long ;-) | |
35 syn sync lines=1000 | |
36 | |
37 " Characters allowed in keywords | |
38 " I don't know if 128-255 are allowed in ANS-FORHT | |
39 if version >= 600 | |
40 setlocal iskeyword=@,48-57,.,@-@,_,192-255 | |
41 else | |
42 set iskeyword=@,48-57,.,@-@,_,192-255 | |
43 endif | |
44 | |
45 " Some special keywords | |
46 syn keyword loutTodo contained TODO lout Lout LOUT | |
47 syn keyword loutDefine def macro | |
48 | |
49 " Some big structures | |
50 syn keyword loutKeyword @Begin @End @Figure @Tab | |
51 syn keyword loutKeyword @Book @Doc @Document @Report | |
52 syn keyword loutKeyword @Introduction @Abstract @Appendix | |
53 syn keyword loutKeyword @Chapter @Section @BeginSections @EndSections | |
54 | |
55 " All kind of Lout keywords | |
56 syn match loutFunction '\<@[^ \t{}]\+\>' | |
57 | |
58 " Braces -- Don`t edit these lines! | |
59 syn match loutMBraces '[{}]' | |
60 syn match loutIBraces '[{}]' | |
61 syn match loutBBrace '[{}]' | |
62 syn match loutBIBraces '[{}]' | |
63 syn match loutHeads '[{}]' | |
64 | |
65 " Unmatched braces. | |
66 syn match loutBraceError '}' | |
67 | |
68 " End of multi-line definitions, like @Document, @Report and @Book. | |
69 syn match loutEOmlDef '^//$' | |
70 | |
71 " Grouping of parameters and objects. | |
72 syn region loutObject transparent matchgroup=Delimiter start='{' matchgroup=Delimiter end='}' contains=ALLBUT,loutBraceError | |
73 | |
74 " The NULL object has a special meaning | |
75 syn keyword loutNULL {} | |
76 | |
77 " Comments | |
78 syn region loutComment start='\#' end='$' contains=loutTodo | |
79 | |
80 " Double quotes | |
81 syn region loutSpecial start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
82 | |
83 " ISO-LATIN-1 characters created with @Char, or Adobe symbols | |
84 " created with @Sym | |
85 syn match loutSymbols '@\(\(Char\)\|\(Sym\)\)\s\+[A-Za-z]\+' | |
86 | |
87 " Include files | |
88 syn match loutInclude '@IncludeGraphic\s\+\k\+' | |
89 syn region loutInclude start='@\(\(SysInclude\)\|\(IncludeGraphic\)\|\(Include\)\)\s*{' end='}' | |
90 | |
91 " Tags | |
92 syn match loutTag '@\(\(Tag\)\|\(PageMark\)\|\(PageOf\)\|\(NumberOf\)\)\s\+\k\+' | |
93 syn region loutTag start='@Tag\s*{' end='}' | |
94 | |
95 " Equations | |
96 syn match loutMath '@Eq\s\+\k\+' | |
97 syn region loutMath matchgroup=loutMBraces start='@Eq\s*{' matchgroup=loutMBraces end='}' contains=ALLBUT,loutBraceError | |
98 " | |
99 " Fonts | |
100 syn match loutItalic '@I\s\+\k\+' | |
101 syn region loutItalic matchgroup=loutIBraces start='@I\s*{' matchgroup=loutIBraces end='}' contains=ALLBUT,loutBraceError | |
102 syn match loutBold '@B\s\+\k\+' | |
103 syn region loutBold matchgroup=loutBBraces start='@B\s*{' matchgroup=loutBBraces end='}' contains=ALLBUT,loutBraceError | |
104 syn match loutBoldItalic '@BI\s\+\k\+' | |
105 syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=loutBIBraces end='}' contains=ALLBUT,loutBraceError | |
106 syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError | |
107 | |
108 " Define the default highlighting. | |
109 " For version 5.7 and earlier: only when not done already | |
110 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
111 if version >= 508 || !exists("did_lout_syn_inits") | |
112 if version < 508 | |
113 let did_lout_syn_inits = 1 | |
114 command -nargs=+ HiLink hi link <args> | |
115 else | |
116 command -nargs=+ HiLink hi def link <args> | |
117 endif | |
118 | |
119 " The default methods for highlighting. Can be overrriden later. | |
120 HiLink loutTodo Todo | |
121 HiLink loutDefine Define | |
122 HiLink loutEOmlDef Define | |
123 HiLink loutFunction Function | |
124 HiLink loutBraceError Error | |
125 HiLink loutNULL Special | |
126 HiLink loutComment Comment | |
127 HiLink loutSpecial Special | |
128 HiLink loutSymbols Character | |
129 HiLink loutInclude Include | |
130 HiLink loutKeyword Keyword | |
131 HiLink loutTag Tag | |
132 HiLink loutMath Number | |
133 | |
134 " HiLink Not really needed here, but I think it is more consistent. | |
135 HiLink loutMBraces loutMath | |
136 hi loutItalic term=italic cterm=italic gui=italic | |
137 HiLink loutIBraces loutItalic | |
138 hi loutBold term=bold cterm=bold gui=bold | |
139 HiLink loutBBraces loutBold | |
140 hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic | |
141 HiLink loutBIBraces loutBoldItalic | |
142 hi loutHeadings term=bold cterm=bold guifg=indianred | |
143 HiLink loutHeads loutHeadings | |
144 | |
145 delcommand HiLink | |
146 endif | |
147 | |
148 let b:current_syntax = "lout" | |
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 | 153 " vim:ts=8:sw=4:nocindent:smartindent: |