problem with perl snips in xptemplate plugin

18 views
Skip to first unread message

KKde

unread,
May 24, 2013, 5:33:46 PM5/24/13
to vim...@googlegroups.com
Hi,

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?

KKde

unread,
May 24, 2013, 6:22:44 PM5/24/13
to vim...@googlegroups.com

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?

Reply all
Reply to author
Forward
0 new messages