Need help with autoimplem for c, c++

41 views
Skip to first unread message

Chris Comediant

unread,
Mar 19, 2011, 8:18:55 AM3/19/11
to xptemplate
Hi

I want to use autoimpl with xptemplate, and i can't get it to work
I use xptemplate from vim site, and I stumbled upon couple of problems
when I tried to use
autoimplement for c, c++.
I sue supertabplugin and xptemplate ( and couple of other plugins )
First
I tried to enable bundle
let g:xptemplate_bundle = 'cpp'
I got error
Error detected while processing /.vim/plugin/xptemplate.conf.vim:
line 127:
E688: More targets than List items
and the
hclass, hfunct wasn't listed as available completions

So I looked around help more and I saw
call g:XPTaddBundle('cpp', 'autoimplem')
this did the trick but I think only on buffer I was currently working
so naturally i added to my .vimrc

autocmd BufEnter *.cpp call g:XPTaddBundle('cpp', 'autoimplem')
autocmd BufEnter *.h call g:XPTaddBundle('cpp', 'autoimplem')

again this helps but if cpp file don't exists the auto generated
methods won't get created.

If all this is caused by old version of xptemplates ?
Overall I think it is good plug in but I haven't got much time to
accustom to it so maybe this causes all the troubles.

I will be gratefully for every help and point to use xptemplates
better.

dr-dr xp

unread,
Mar 19, 2011, 8:49:55 AM3/19/11
to xptem...@googlegroups.com
value of g:xptemplate_bundle must be in this form:
<filetype>_<bundle_name>
let g:xptemplate_bundle = "javascript_jquery" enable loading bundle "jquery" in ftplugin/javascript

see :h g:xptemplate_bundle

If "cpp" is your bundle name, use :
let g:xptemplate_bundle="cpp_cpp"

but using a name same with filetype is not recommended.



--
You received this message because you are subscribed to the Google Groups "xptemplate" group.
To post to this group, send email to xptem...@googlegroups.com.
To unsubscribe from this group, send email to xptemplate+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xptemplate?hl=en.




--
要了几天饱饭就不记得西北风啥味了

Krzysztof

unread,
Mar 19, 2011, 10:39:02 AM3/19/11
to xptem...@googlegroups.com
Thanks - I looked upon xptemplate.conf.vim and I didn't know why the
second split( *, '_'),
now I know :)
so basically what I wanted all along was,

let g:xptemplate_bundle = cpp_autoimplem

Great work on that plugin by the way.

Reply all
Reply to author
Forward
0 new messages