-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Given the following JSON document:
{
"builders": [
{
"type": "amazon-ebs",
"ami_name": "foo-{{timestamp}}",
"instance_type": "t3.small"
}
]
}
Moving the cursor to line 6 character 14 (the "i" in instance_type
) and running :JsonPath
, the result is builders.0.ami_name.instance_type
when it should clearly be builders.0.instance_type
. This appears to corrupt all subsequent parsing of the file, yielding amusing results on the very large Packer template I was testing with.
This appears to be due to the {{timestamp}}
in the string literal; the vimscript parser doesn't actually parse correctly and can't handle JSON inside string literals. Presumably this would be better if I had linked Python into my vim, but alas I do not have such a build.
Metadata
Metadata
Assignees
Labels
No labels