-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsxml.vim
More file actions
32 lines (23 loc) · 1002 Bytes
/
Copy pathsxml.vim
File metadata and controls
32 lines (23 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
" Vim syntax file
" Language: SXML (S-Expression Markup Language)
" Filetype: sxml
if exists("b:current_syntax")
finish
endif
syn case match
" Regular brackets with nextgroup to pick up the first element
syn match sxmlOpenBracket "(" nextgroup=sxmlTagName,sxmlAttrOp skipwhite skipempty skipnl
syn match sxmlCloseBracket ")"
" First element of an sexp: tag name (does not start with @, (, or ))
syn match sxmlTagName "[^@() \t\n][^() \t\n]*" contained
" Attribute operator: @name — the whole @word is the attribute
syn match sxmlAttrOp "@[^() \t\n]*" contained
" Double-bracket escape region — plain text, no colouring or sub-syntax.
" Must be defined last to take priority over sxmlOpenBracket at the same position.
syn region sxmlDoubleRegion start="((" end="))" keepend
hi def link sxmlOpenBracket Delimiter
hi def link sxmlCloseBracket Delimiter
hi def link sxmlTagName htmlTagName
hi def link sxmlAttrOp htmlArg
syn sync minlines=50
let b:current_syntax = "sxml"