Reputation: 977
If there a syntax region definition, how to get the definition using VimL or Python?
eg, below is a definition, how can I get the data start from start
syntax region potionString start=/\v"/ skip=/\v\\./ end=/\v"/
Upvotes: 0
Views: 125
Reputation: 10456
This will match start
value till the next whitespace.
syntax region potionString start=/\v"/ skip=/\v\\./ end=/\v"/
redir @a
silent syntax list potionString
redir END
let def=split(@a, '\n')[1]
let start=matchstr(def, "start=\\zs.*\\ze\s")
echo start
Upvotes: 1