Is anyone using xptemplate plugin? If yes anyone has problem with snips for perl filetype?
when I trigger any snippet defined for perl I get the below error
Error detected while processing function XPPprocess..5..<SNR>45_DoStart..<SNR>45_RenderSnippet..<SNR>45_NewRenderContext..XPT#classNew..<SNR>35_New:
E713: Cannot use empty key for Dictionary
I enabled verbose setting and tried to debug. But I find tracing problem is hard in vim(i'm not expert in vim script.
Note: For other file types i'm not having this problem. They are working fine.
PS: I see xptemplate google group is inactive and hence asking the question here?
After setting verbose > 13, I found the issue.
code is having issue at this point
let indentkeysList = split( &indentkeys, ',' )
call filter( indentkeysList, 'v:val=~''\V\^0''' )
for k in indentkeysList
if k[ 1 ] == '='
let self.oriIndentkeys[ k[ 2: ] ] = 1
else
let self.leadingCharToReindent[ k[ 1: ] ] = 1
endif
endfor
For, perl language the indentkeys is set to 0{,0},:,0#,!^F,o,O,e,0=,0),0],0=or,0=and
and the expression 0= is causing problem. I fixed this problematic code using
if strlen(k) > 2
let self.oriIndentkeys[ k[ 2: ] ] = 1
endif
Question is, Is indentkeys 0= is meaningful?