annotate runtime/syntax/sexplib.vim @ 26486:8d598308f113 v8.2.3773

patch 8.2.3773: wrong window size when a modeline changes 'columns' Commit: https://github.com/vim/vim/commit/8a7374f8c4eb4c016270ad908a43af4ddedcbf56 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 10 12:11:09 2021 +0000 patch 8.2.3773: wrong window size when a modeline changes 'columns' Problem: Wrong window size when a modeline changes 'columns' and there is more than one tabpage. (Michael Soyka) Solution: Adjust the frames of all tabpages. (closes #9315)
author Bram Moolenaar <Bram@vim.org>
date Fri, 10 Dec 2021 13:15:02 +0100
parents 15fa3923cc49
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: S-expressions as used in Sexplib
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Filenames: *.sexp
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Maintainers: Markus Mottl <markus.mottl@gmail.com>
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " URL: https://github.com/ocaml/vim-ocaml
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 " Last Change: 2020 Dec 31 - Updated header for Vim contribution (MM)
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 " 2017 Apr 11 - Improved matching of negative numbers (MM)
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 " 2012 Jun 20 - Fixed a block comment highlighting bug (MM)
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 " For version 5.x: Clear all syntax items
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 " For version 6.x: Quit when a syntax file was already loaded
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 if version < 600
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 syntax clear
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 elseif exists("b:current_syntax") && b:current_syntax == "sexplib"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 finish
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 endif
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 " Sexplib is case sensitive.
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 syn case match
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 " Comments
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 syn keyword sexplibTodo contained TODO FIXME XXX NOTE
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn region sexplibBlockComment matchgroup=sexplibComment start="#|" matchgroup=sexplibComment end="|#" contains=ALLBUT,sexplibQuotedAtom,sexplibUnquotedAtom,sexplibEncl,sexplibComment
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 syn match sexplibSexpComment "#;" skipwhite skipempty nextgroup=sexplibQuotedAtomComment,sexplibUnquotedAtomComment,sexplibListComment,sexplibComment
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 syn region sexplibQuotedAtomComment start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn match sexplibUnquotedAtomComment /\([^;()" \t#|]\|#[^;()" \t|]\||[^;()" \t#]\)[^;()" \t]*/ contained
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 syn region sexplibListComment matchgroup=sexplibComment start="(" matchgroup=sexplibComment end=")" contained contains=ALLBUT,sexplibEncl,sexplibString,sexplibQuotedAtom,sexplibUnquotedAtom,sexplibTodo,sexplibNumber,sexplibFloat
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 syn match sexplibComment ";.*" contains=sexplibTodo
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 " Atoms
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn match sexplibUnquotedAtom /\([^;()" \t#|]\|#[^;()" \t|]\||[^;()" \t#]\)[^;()" \t]*/
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 syn region sexplibQuotedAtom start=+"+ skip=+\\\\\|\\"+ end=+"+
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 syn match sexplibNumber "-\=\<\d\(_\|\d\)*[l|L|n]\?\>"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 syn match sexplibNumber "-\=\<0[x|X]\(\x\|_\)\+[l|L|n]\?\>"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 syn match sexplibNumber "-\=\<0[o|O]\(\o\|_\)\+[l|L|n]\?\>"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 syn match sexplibNumber "-\=\<0[b|B]\([01]\|_\)\+[l|L|n]\?\>"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn match sexplibFloat "-\=\<\d\(_\|\d\)*\.\?\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 " Lists
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 syn region sexplibEncl transparent matchgroup=sexplibEncl start="(" matchgroup=sexplibEncl end=")" contains=ALLBUT,sexplibParenErr
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 " Errors
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 syn match sexplibUnquotedAtomErr /\([^;()" \t#|]\|#[^;()" \t|]\||[^;()" \t#]\)[^;()" \t]*\(#|\||#\)[^;()" \t]*/
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 syn match sexplibParenErr ")"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 " Synchronization
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 syn sync minlines=50
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 syn sync maxlines=500
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 " Define the default highlighting.
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 " For version 5.7 and earlier: only when not done already
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 " For version 5.8 and later: only when an item doesn't have highlighting yet
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 if version >= 508 || !exists("did_sexplib_syntax_inits")
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 if version < 508
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 let did_sexplib_syntax_inits = 1
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 command -nargs=+ HiLink hi link <args>
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 else
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 command -nargs=+ HiLink hi def link <args>
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 endif
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 HiLink sexplibParenErr Error
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 HiLink sexplibUnquotedAtomErr Error
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 HiLink sexplibComment Comment
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 HiLink sexplibSexpComment Comment
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 HiLink sexplibQuotedAtomComment Include
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 HiLink sexplibUnquotedAtomComment Comment
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 HiLink sexplibBlockComment Comment
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 HiLink sexplibListComment Comment
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 HiLink sexplibBoolean Boolean
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 HiLink sexplibCharacter Character
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 HiLink sexplibNumber Number
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 HiLink sexplibFloat Float
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 HiLink sexplibUnquotedAtom Identifier
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 HiLink sexplibEncl Identifier
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 HiLink sexplibQuotedAtom Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 HiLink sexplibTodo Todo
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 HiLink sexplibEncl Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 delcommand HiLink
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 endif
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 let b:current_syntax = "sexplib"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 " vim: ts=8