Sublime Forum

Is there any way of inspecting the "runtime" variables in a YAML file?

#1

I’ve been using Sublime text to unsuccessfully create an extension to a YAML file. (I have a post about that specific problem a bit earlier.)

As I’ve kept poking at the problem, I realised it would be really helpful to be able to view the contents of a variable, at “runtime” after all substitutions have been made. ie. The exact data that is going to be presented to a pattern matcher or similar.

Is there some way of viewing that data in Sublime Text?

Thanks

0 Likes

#2

If you make a regex syntax error (perhaps add a trailing closing paren for example) then likely the error should show the full regex pattern with variable replacements applied. But I don’t know of another way…

0 Likes

#3

Ooh, good idea! I’ll give it a go.

0 Likes

#4

I just tried it, and sadly, it does not work. The parser catches the Regex error before the substitution is made.

So I get an error like:

error: Error loading syntax file "Packages/User/OCIO.sublime-syntax": Error in regex: unmatched close parenthesis in regex (?:{{ocio-verbatim-tag}}))

0 Likes