annotate runtime/syntax/cl.vim @ 11010:c004e17fa36b v8.0.0394

patch 8.0.0394: tabs are not aligned when scrolling horizontally commit https://github.com/vim/vim/commit/abc39ab642791ae3d22a524516eeedb673a95d9d Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 1 18:04:05 2017 +0100 patch 8.0.0394: tabs are not aligned when scrolling horizontally Problem: Tabs are not aligned when scrolling horizontally and a Tab doesn't fit. (Axel Bender) Solution: Handle a Tab as a not fitting character. (Christian Brabandt) Also fix that ":redraw" does not scroll horizontally to show the cursor. And fix the test that depended on the old behavior.
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Mar 2017 18:15:04 +0100
parents 46763b01cd9a
children
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
4186
7ffc704cb7c1 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4098
diff changeset
2 " Language: CL
7ffc704cb7c1 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4098
diff changeset
3 " (pronounced alphabetically: "Cee-El".
7ffc704cb7c1 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4098
diff changeset
4 " CL stands for Clever Language,
7ffc704cb7c1 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4098
diff changeset
5 " but the language is CL, not "Clever".
7ffc704cb7c1 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4098
diff changeset
6 " CL was created by Multibase, http://www.mbase.com.au)
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
7 " Filename extensions: *.ent
4186
7ffc704cb7c1 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4098
diff changeset
8 " *.eni
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
9 " Maintainer: Philip Uren <philuSPAX@ieee.org> Remove SPAX spam block
4186
7ffc704cb7c1 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4098
diff changeset
10 " Version: 6
7ffc704cb7c1 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4098
diff changeset
11 " Last Change: Mar 06 2013
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4186
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: 4186
diff changeset
14 if exists("b:current_syntax")
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
15 finish
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4186
diff changeset
18 setlocal iskeyword=@,48-57,_,-
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn sync lines=300
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 "If/else/elsif/endif and while/wend mismatch errors
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
25 syn match clifError "\<wend\>"
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
26 syn match clifError "\<elsif\>"
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
27 syn match clifError "\<else\>"
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
28 syn match clifError "\<endif\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
30 syn match clSpaceError "\s\+$"
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
31
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " If and while regions
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
33 syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
34 syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Make those TODO notes and debugging stand out!
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
37 syn keyword clTodo contained TODO BUG DEBUG FIX
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
38 syn match clNeedsWork contained "NEED[S]*\s\s*WORK"
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
39 syn keyword clDebug contained debug
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
41 syn match clComment "#.*$" contains=clTodo,clNeedsWork,@Spell
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
42 syn region clProcedure oneline start="^\s*[{}]" end="$"
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
43 syn match clInclude "^\s*include\s.*"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " We don't put "debug" in the clSetOptions;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " we contain it in clSet so we can make it stand out.
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
47 syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
48 syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
50 syn match clPreProc "^\s*#P.*"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
52 syn keyword clConditional else elsif
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
53 syn keyword clWhile continue endloop
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " 'break' needs to be a region so we can sync on it above.
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
55 syn region clBreak oneline start="^\s*break" end="$"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
57 syn match clOperator "[!;|)(:.><+*=-]"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
59 syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
61 syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ contains=@Spell
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
62 syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
64 syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
66 syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
68 syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4186
diff changeset
71 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
73 hi def link clifError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
74 hi def link clSpaceError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
75 hi def link clWhile Repeat
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
76 hi def link clConditional Conditional
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
77 hi def link clDebug Debug
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
78 hi def link clNeedsWork Todo
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
79 hi def link clTodo Todo
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
80 hi def link clComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
81 hi def link clProcedure Procedure
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
82 hi def link clBreak Procedure
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
83 hi def link clInclude Include
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
84 hi def link clSetOption Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
85 hi def link clSet Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
86 hi def link clPreProc PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
87 hi def link clOperator Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
88 hi def link clNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
89 hi def link clString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
90 hi def link clQuote Delimiter
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
91 hi def link clReserved Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
92 hi def link clFunction Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
93 hi def link clStatement Statement
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 let b:current_syntax = "cl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
98 " vim: ts=8 sw=8