I am trying out the c.vim plugin. The plug-in works great. But I have a small problem in using Doxygen. What I would like is to generate a doxygen style comments for a function automatically ( as soon as I fill the place holders ).
But the latter is not working. It just generates the default comments.
I have set " let g:C_UseTool_doxygen = 'yes' " in my .vimrc.
According to the documentation (http://lug.fh-swf.de/vim/vim-c/csupport.html#csupport-doxygen), I should open the Templates file (https://github.com/vim-scripts/c.vim/blob/master/c-support/templates/Templates) and include 'doxygen.template'. However, I dont have that template file. So I took it from http://www.vim.org/scripts/download_script.php?src_id=21803 and placed it in the right folder. Even now it is not working.
As a side question (or a comment)... I checked the idioms file for the template of function. There the return type is hard coded as "void". Should'nt the return type be a place holder?
Can someone help me.. especially with the first question...
lh-cpp provides the :DOX command for this purpose. It processes the return type, the parameter list, and the exception specification. C++ templates parameters are not yet detected -- I have to rewrite the parser to use clang for this purpose.
The templates can be tuned thanks to options, and even modified/overloaded.
Regarding snippet/template for a function, I really don't see the point for a snippet as what a snippet can add is the pair of curly brackets and the pair of round brackets and a few spaces. IMO, a bracketing system will be as efficient here. And yet, it could be as simple as:
<+void+> <+name+>(<+parameters+>){<+code+>}
(There are no spaces here as lh-cpp, through mu-template, uses the styling feature from lh-dev -- yeah, there are many plugins involved here -- to add the spaces and newlines where ever the project style commands to)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With