annotate runtime/syntax/awk.vim @ 7538:c9fc24b76293 v7.4.1070

commit https://github.com/vim/vim/commit/8a5115cf18751022387af2085f374d38c60dde83 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 9 19:41:11 2016 +0100 patch 7.4.1070 Problem: The Tcl interface can't be loaded dynamically on Unix. Solution: Make it possible to load it dynamically. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Sat, 09 Jan 2016 19:45:05 +0100
parents 435956324539
children 9f921133ee90
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: awk, nawk, gawk, mawk
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 216
diff changeset
3 " Maintainer: Antonio Colombo <azc100@gmail.com>
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
4 " Last Change: 2014 Oct 21
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " The AWK Programming Language, Addison-Wesley, 1988
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " GAWK ref. is: Arnold D. Robbins
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Effective AWK Programming, Third Edition, O'Reilly, 2001
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
11 " Effective AWK Programming, Fourth Edition, O'Reilly, 2015
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
12 " (also available with the gawk source distribution)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " MAWK is a "new awk" meaning it implements AWK ref.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " mawk conforms to the Posix 1003.2 (draft 11.3)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " definition of the AWK language which contains a few features
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " not described in the AWK book, and mawk provides a small number of extensions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " TODO:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Dig into the commented out syntax expressions below.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 216
diff changeset
30 let s:cpo_save = &cpo
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 216
diff changeset
31 set cpo&vim
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 216
diff changeset
32
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " A bunch of useful Awk keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " AWK ref. p. 188
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword awkStatement break continue delete exit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword awkStatement function getline next
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword awkStatement print printf return
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
38 " GAWK ref. Chapter 7
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword awkStatement nextfile
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
40 "
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
41 " GAWK ref. Chapter 9, Functions
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
42 "
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
43 " Numeric Functions
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
44 syn keyword awkFunction atan2 cos div exp int log rand sin sqrt srand
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
45 " String Manipulation Functions
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
46 syn keyword awkFunction asort asort1 gensub gsub index length match
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
47 syn keyword awkFunction patsplit split sprintf strtonum sub substr
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword awkFunction tolower toupper
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
49 " Input Output Functions
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
50 syn keyword awkFunction close fflush system
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
51 " Time Functions
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
52 syn keyword awkFunction mktime strftime systime
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
53 " Bit Manipulation Functions
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
54 syn keyword awkFunction and compl lshift or rshift xor
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
55 " Getting Type Function
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
56 syn keyword awkFunction isarray
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
57 " String-Translation Functions
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
58 syn keyword awkFunction bindtextdomain dcgettext dcngetext
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword awkConditional if else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword awkRepeat while for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword awkTodo contained TODO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword awkPatterns BEGIN END
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
66
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
67 " GAWK ref. Chapter 7
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
68 " Built-in Variables That Control awk
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
69 syn keyword awkVariables BINMODE CONVFMT FIELDWIDTHS FPAT FS
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
70 syn keyword awkVariables IGNORECASE LINT OFMT OFS ORS PREC
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
71 syn keyword awkVariables ROUNDMODE RS SUBSEP TEXTDOMAIN
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
72 " Built-in Variables That Convey Information
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
73 syn keyword awkVariables ARGC ARGV ARGIND ENVIRON ERRNO FILENAME
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
74 syn keyword awkVariables FNR NF FUNCTAB NR PROCINFO RLENGTH RSTART
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
75 syn keyword awkVariables RT SYMTAB
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword awkRepeat do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Octal format character.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match awkSpecialCharacter display contained "\\[0-7]\{1,3\}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword awkStatement func nextfile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " Hex format character.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match awkSpecialCharacter display contained "\\x[0-9A-Fa-f]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match awkFieldVars "\$\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 "catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match awkParenError display ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match awkInParen display contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 " 64 lines for complex &&'s, and ||'s in a big "if"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn sync ccomment awkParen maxlines=64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " Search strings & Regular Expressions therein.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn region awkSearch oneline start="^[ \t]*/"ms=e start="\(,\|!\=\~\)[ \t]*/"ms=e skip="\\\\\|\\/" end="/" contains=awkBrackets,awkRegExp,awkSpecialCharacter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn region awkBrackets contained start="\[\^\]\="ms=s+2 start="\[[^\^]"ms=s+1 end="\]"me=e-1 contains=awkBrktRegExp,awkCharClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn region awkSearch oneline start="[ \t]*/"hs=e skip="\\\\\|\\/" end="/" contains=awkBrackets,awkRegExp,awkSpecialCharacter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match awkCharClass contained "\[:[^:\]]*:\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match awkBrktRegExp contained "\\.\|.\-[^]]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match awkRegExp contained "/\^"ms=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match awkRegExp contained "\$/"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match awkRegExp contained "[?.*{}|+]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 " String and Character constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " Highlight special characters (those which have a backslash) differently
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3312
diff changeset
108 syn region awkString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,awkSpecialCharacter,awkSpecialPrintf
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match awkSpecialCharacter contained "\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 " Some of these combinations may seem weird, but they work.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match awkSpecialPrintf contained "%[-+ #]*\d*\.\=\d*[cdefgiosuxEGX%]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " Numbers, allowing signs (both -, and +)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 " Integer number.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn match awkNumber display "[+-]\=\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " Floating point number.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn match awkFloat display "[+-]\=\<\d\+\.\d+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " Floating point number, starting with a dot.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn match awkFloat display "[+-]\=\<.\d+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 "floating point number, with dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn match awkFloat display "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 "floating point number, starting with a dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn match awkFloat display "\.\d\+\(e[-+]\=\d\+\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 "floating point number, without dot, with exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn match awkFloat display "\<\d\+e[-+]\=\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 "syn match awkIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " Arithmetic operators: +, and - take care of ++, and --
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
133 syn match awkOperator "+\|-\|\*\|/\|%\|="
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
134 syn match awkOperator "+=\|-=\|\*=\|/=\|%="
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
135 syn match awkOperator "^\|^="
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 " Comparison expressions.
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
138 syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!="
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
139 syn match awkExpression "\~\|\!\~"
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
140 syn match awkExpression "?\|:"
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
141 syn keyword awkExpression in
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 " Boolean Logic (OR, AND, NOT)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 "syn match awkBoolLogic "||\|&&\|\!"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 " This is overridden by less-than & greater-than.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 " Put this above those to override them.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 " Put this in a 'match "\<printf\=\>.*;\="' to make it not override
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 " less/greater than (most of the time), but it won't work yet because
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3312
diff changeset
150 " keywords always have precedence over match & region.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 " File I/O: (print foo, bar > "filename") & for nawk (getline < "filename")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 "syn match awkFileIO contained ">"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 "syn match awkFileIO contained "<"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 " Expression separators: ';' and ','
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 syn match awkSemicolon ";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 syn match awkComma ","
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3312
diff changeset
159 syn match awkComment "#.*" contains=@Spell,awkTodo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 syn match awkLineSkip "\\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 " Highlight array element's (recursive arrays allowed).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 " Keeps nested array names' separate from normal array elements.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 " Keeps numbers separate from normal array elements (variables).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 syn match awkArrayArray contained "[^][, \t]\+\["me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 syn match awkArrayElement contained "[^][, \t]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syn region awkArray transparent start="\[" end="\]" contains=awkArray,awkArrayElement,awkArrayArray,awkNumber,awkFloat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 " 10 should be enough.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 " (for the few instances where it would be more than "oneline")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 syn sync ccomment awkArray maxlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 " define the default highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 " For version 5.7 and earlier: only when not done already
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3312
diff changeset
176 " For version 5.8 and later: only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 if version >= 508 || !exists("did_awk_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 let did_awk_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 HiLink awkConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 HiLink awkFunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 HiLink awkRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 HiLink awkStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 HiLink awkString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 HiLink awkSpecialPrintf Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 HiLink awkSpecialCharacter Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 HiLink awkSearch String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 HiLink awkBrackets awkRegExp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 HiLink awkBrktRegExp awkNestRegExp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 HiLink awkCharClass awkNestRegExp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 HiLink awkNestRegExp Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 HiLink awkRegExp Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 HiLink awkNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 HiLink awkFloat Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 HiLink awkFileIO Special
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
205 HiLink awkOperator Special
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
206 HiLink awkExpression Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 HiLink awkBoolLogic Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 HiLink awkPatterns Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 HiLink awkVariables Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 HiLink awkFieldVars Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 HiLink awkLineSkip Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 HiLink awkSemicolon Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 HiLink awkComma Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 "HiLink awkIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 HiLink awkComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 HiLink awkTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 " Change this if you want nested array names to be highlighted.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 HiLink awkArrayArray awkArray
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 HiLink awkArrayElement Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 HiLink awkParenError awkError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 HiLink awkInParen awkError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 HiLink awkError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 let b:current_syntax = "awk"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 216
diff changeset
234 let &cpo = s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 216
diff changeset
235 unlet s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 216
diff changeset
236
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 " vim: ts=8