mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-23 19:12:06 +03:00
Support template in vim syntax highlighting
This commit is contained in:
parent
e5d3cbe729
commit
1e3c16192f
@ -20,9 +20,10 @@ syntax match EscapeQuote "\\\""
|
|||||||
syntax match Section "\[[A-Za-z]*\]"
|
syntax match Section "\[[A-Za-z]*\]"
|
||||||
syntax match Number "\s[0-9]*"
|
syntax match Number "\s[0-9]*"
|
||||||
|
|
||||||
syntax region String start='"' end='"' contains=EscapeQuote
|
syntax region String start='"' end='"' contains=EscapeQuote
|
||||||
syntax region String start='```' end='```'
|
syntax region String start='```' end='```'
|
||||||
syntax region Json start='{' end='}'
|
syntax region Json start='{' end='}' contains=Template
|
||||||
|
syntax region Template start='{{' end='}}'
|
||||||
|
|
||||||
|
|
||||||
" colors
|
" colors
|
||||||
@ -34,5 +35,6 @@ highlight Json ctermfg=green
|
|||||||
highlight Number ctermfg=lightblue
|
highlight Number ctermfg=lightblue
|
||||||
highlight EscapeNumberSign ctermfg=white
|
highlight EscapeNumberSign ctermfg=white
|
||||||
highlight EscapeQuote ctermfg=green
|
highlight EscapeQuote ctermfg=green
|
||||||
|
highlight Template ctermfg=red
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# This is a comment
|
# This is a comment
|
||||||
GET http://example.com
|
GET http://{{host}}
|
||||||
Header1: Value1
|
Header1: Value1
|
||||||
Header2: a\# # value with \#
|
Header2: a\# # value with \#
|
||||||
Header3: GET
|
Header3: GET
|
||||||
@ -15,7 +15,7 @@ body not contains "\"\#"
|
|||||||
|
|
||||||
POST http://example.com
|
POST http://example.com
|
||||||
{
|
{
|
||||||
"id": 123,
|
"id": {{id}},
|
||||||
"message": "Hello"
|
"message": "Hello"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user