Wednesday, July 24, 2013

Re: generate .cpp file framework from .h file

Hello,

> Is there a plugin for vim that helps me generate .c or .cpp file
> framework from .h file. I have searched on some forums,but I can't
> find something wanted.

I am maintaining lh-cpp [1] which provides a command that generates am empty definition given a function declaration. It understands nested scoped, and diverse qualifiers (const, exception specifications, etc). Its main problem is with template parameters. Some day I'll take care of them.

Alas, It does not parse a .h to find all the functions (nor global variables) and generate the appropriate definitions.
It can be written quite easily by iterating on all the functions declared in a .h that ctags will return, and executing :GOTOIMPL on each.

[1] http://code.google.com/p/lh-vim/wiki/lhCpp#Wizards_and_other_high-level_features

HTH,

--
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment