comparison runtime/syntax/awk.vim @ 3513:1b584a6f446c

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Fri, 18 May 2012 13:46:39 +0200
parents b7811ab264bf
children 435956324539
comparison
equal deleted inserted replaced
3512:5ad05e745fda 3513:1b584a6f446c
1 " Vim syntax file 1 " Vim syntax file
2 " Language: awk, nawk, gawk, mawk 2 " Language: awk, nawk, gawk, mawk
3 " Maintainer: Antonio Colombo <azc100@gmail.com> 3 " Maintainer: Antonio Colombo <azc100@gmail.com>
4 " Last Change: 2012 Jan 31 4 " Last Change: 2012 May 18
5 5
6 " AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger 6 " AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
7 " The AWK Programming Language, Addison-Wesley, 1988 7 " The AWK Programming Language, Addison-Wesley, 1988
8 8
9 " GAWK ref. is: Arnold D. Robbins 9 " GAWK ref. is: Arnold D. Robbins
88 syn match awkRegExp contained "\$/"me=e-1 88 syn match awkRegExp contained "\$/"me=e-1
89 syn match awkRegExp contained "[?.*{}|+]" 89 syn match awkRegExp contained "[?.*{}|+]"
90 90
91 " String and Character constants 91 " String and Character constants
92 " Highlight special characters (those which have a backslash) differently 92 " Highlight special characters (those which have a backslash) differently
93 syn region awkString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=awkSpecialCharacter,awkSpecialPrintf 93 syn region awkString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,awkSpecialCharacter,awkSpecialPrintf
94 syn match awkSpecialCharacter contained "\\." 94 syn match awkSpecialCharacter contained "\\."
95 95
96 " Some of these combinations may seem weird, but they work. 96 " Some of these combinations may seem weird, but they work.
97 syn match awkSpecialPrintf contained "%[-+ #]*\d*\.\=\d*[cdefgiosuxEGX%]" 97 syn match awkSpecialPrintf contained "%[-+ #]*\d*\.\=\d*[cdefgiosuxEGX%]"
98 98
130 130
131 " This is overridden by less-than & greater-than. 131 " This is overridden by less-than & greater-than.
132 " Put this above those to override them. 132 " Put this above those to override them.
133 " Put this in a 'match "\<printf\=\>.*;\="' to make it not override 133 " Put this in a 'match "\<printf\=\>.*;\="' to make it not override
134 " less/greater than (most of the time), but it won't work yet because 134 " less/greater than (most of the time), but it won't work yet because
135 " keywords allways have precedence over match & region. 135 " keywords always have precedence over match & region.
136 " File I/O: (print foo, bar > "filename") & for nawk (getline < "filename") 136 " File I/O: (print foo, bar > "filename") & for nawk (getline < "filename")
137 "syn match awkFileIO contained ">" 137 "syn match awkFileIO contained ">"
138 "syn match awkFileIO contained "<" 138 "syn match awkFileIO contained "<"
139 139
140 " Expression separators: ';' and ',' 140 " Expression separators: ';' and ','
141 syn match awkSemicolon ";" 141 syn match awkSemicolon ";"
142 syn match awkComma "," 142 syn match awkComma ","
143 143
144 syn match awkComment "#.*" contains=awkTodo 144 syn match awkComment "#.*" contains=@Spell,awkTodo
145 145
146 syn match awkLineSkip "\\$" 146 syn match awkLineSkip "\\$"
147 147
148 " Highlight array element's (recursive arrays allowed). 148 " Highlight array element's (recursive arrays allowed).
149 " Keeps nested array names' separate from normal array elements. 149 " Keeps nested array names' separate from normal array elements.
156 " (for the few instances where it would be more than "oneline") 156 " (for the few instances where it would be more than "oneline")
157 syn sync ccomment awkArray maxlines=10 157 syn sync ccomment awkArray maxlines=10
158 158
159 " define the default highlighting 159 " define the default highlighting
160 " For version 5.7 and earlier: only when not done already 160 " For version 5.7 and earlier: only when not done already
161 " For version 5.8 and later: only when an item doesn't have highlightling yet 161 " For version 5.8 and later: only when an item doesn't have highlighting yet
162 if version >= 508 || !exists("did_awk_syn_inits") 162 if version >= 508 || !exists("did_awk_syn_inits")
163 if version < 508 163 if version < 508
164 let did_awk_syn_inits = 1 164 let did_awk_syn_inits = 1
165 command -nargs=+ HiLink hi link <args> 165 command -nargs=+ HiLink hi link <args>
166 else 166 else