Given a dictionary:
let g:dict = {
\ 'FOO/BAR': 'BAZ',
\ 'FIZZ': 'BUZZ'
}
Vim is fine with this:
:echo g:dict.FIZZ
But chokes on this:
:echo g:dict.FOO/BAR
E716: Key not present in Dictionary: HCL/HCL_0127
E15: Invalid expression: g:dict.FOO/BAR
I've also tried escaping the forward slash as \/
, which doesn't work. However, it has no problem with g:dict['FOO/BAR']
.
Is there any way to access these entries using the dot syntax? Are there other characters I have to watch out for?