annotate runtime/syntax/wsh.vim @ 32659:4e2d73ee7350 v9.0.1661

patch 9.0.1661: BUCK files are not recognized Commit: https://github.com/vim/vim/commit/b46e0f3263acd99c61df06ee3c4d1f6e0b471bc3 Author: Son Luong Ngoc <sluongng@gmail.com> Date: Sat Jun 24 17:11:04 2023 +0100 patch 9.0.1661: BUCK files are not recognized Problem: BUCK files are not recognized. Solution: Recognize BUCK files as "bzl". (Son Luong Ngoc, closes https://github.com/vim/vim/issues/12564)
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Jun 2023 18:15:05 +0200
parents a81bc802c17c
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Windows Scripting Host
19
a81bc802c17c updated for version 7.0011
vimboss
parents: 7
diff changeset
3 " Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: Fre, 24 Nov 2000 21:54:09 +0100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " This reuses the XML, VB and JavaScript syntax files. While VB is not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " VBScript, it's close enough for us. No attempt is made to handle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " other languages.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Send comments, suggestions and requests to the maintainer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 let s:wsh_cpo_save = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 set cpo&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 runtime! syntax/xml.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn include @wshVBScript <sfile>:p:h/vb.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn include @wshJavaScript <sfile>:p:h/javascript.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn region wshVBScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 \ matchgroup=xmlTag start="<script[^>]*VBScript\(>\|[^>]*[^/>]>\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 \ matchgroup=xmlEndTag end="</script>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 \ fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 \ contains=@wshVBScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 \ keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn region wshJavaScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 \ matchgroup=xmlTag start="<script[^>]*J\(ava\)\=Script\(>\|[^>]*[^/>]>\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 \ matchgroup=xmlEndTag end="</script>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 \ fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 \ contains=@wshJavaScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 \ keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn cluster xmlRegionHook add=wshVBScript,wshJavaScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 let b:current_syntax = "wsh"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 let &cpo = s:wsh_cpo_save
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 unlet s:wsh_cpo_save