Generate Doxygen comments by parsing function prototype
I'd like to create a simple python snippet that generates automatically a doxygen block from a C/C++ function prototype.
I've started with something very simple like this
snippet dfunct "Funciont/Method doxygen description" b
/*!
* \anchor `!p res=snip.
* \brief TODO
*
* \param[in]
*
* \return `!p res=snip.
*
* <strong>
* \code
* \endcode
*/
${VISUAL}
endsnippet
and the first question that I wanted to ask is if I have to reparse the snip.v.text object every time (like I do above for anchor
and return) or if I can parse it once, and access the result from the rest of the snippets?
The other question I was wondering if there is any way to access the content of the ViM unnamed register from a snippet,
so that I can use that instead of the visually selected text?
Thanks for this great plugin by the way! I really love it.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- UltiSnips Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Salvatore Benedetto for more information if necessary.