DoxygenToolkit.vim - Simplify Doxygen documentation in C, C++. : vim online
Keywords: Vim, Vi IMproved, text editor, home, documentation, tips, scripts, news

DoxygenToolkit.vim : Simplify Doxygen documentation in C, C++.
script karma | Rating 148/54, Downloaded by 2802
created by
Mathias Lorente
script type
utility
description
Actually five purposes have been defined : Generates a doxygen license comment. The tag text is configurable. Generates a doxygen author skeleton. The tag text is configurable. Generates a doxygen comment skeleton for a C, C++, or Java function or class, including @brief, @param (for each named argument), and @return. The tag text as well as a comment block header and footer are configurable. (Consequently, you can have \brief, etc. if you wish, with little effort.) Ignore code fragment placed in a block defined by #ifdef ... #endif. The block name must be given to the function. All of the corresponding blocks in all the file will be treated and placed in a new block DOX_SKIP_BLOCK (or any other name that you have configured). Then you have to update PREDEFINED value in your doxygen configuration file with correct block name. You also have to set ENABLE_PREPROCESSING to YES. Generate a doxygen group (begining and ending). The tag text is configurable. Use: - Type of comments ( /// or /** ... */ ) : In vim, default comments are : /** ... */. But if you prefer to use /// Doxygen comments just add 'let g:DoxygenToolkit_commentType = "C++"' (without quotes) in your .vimrc file - License : In vim, place the cursor on the line that will follow doxygen license comment. Then, execute the command :DoxLic. This will generate license comment and leave the cursor on the line just after. - Author : In vim, place the cursor on the line that will follow doxygen author comment. Then, execute the command :DoxAuthor. This will generate the skeleton and leave the cursor just after @author tag if no variable define it, or just after the skeleton. - Function / class comment : In vim, place the cursor on the line of the function header (or returned value of the function) or the class. Then execute the command :Dox. This will generate the skeleton and leave the cursor after the @brief tag. - Ignore code fragment : In vim, if you want to ignore all code fragment placed in a block such as : #ifdef DEBUG ... #endif You only have to execute the command :DoxUndoc(DEBUG) ! - Group : In vim, execute the command :DoxBlock to insert a doxygen block on the following line. Limitations: - Assumes that the function name (and the following opening parenthesis) is at least on the third line after current cursor position. - Not able to update a comment block after it's been written. - Blocks delimiters (header and footer) are only included for function comment. Example: Given: int foo(char mychar, int myint, double* myarray, int mask = DEFAULT) { //... } Issuing the :Dox command with the cursor on the return of the function declaration would generate /** * @brief * * @param mychar * @param myint * @param myarray * @param mask * * @return */ To customize the output of the script, see the g:DoxygenToolkit_* variables in the script's source. These variables can be set in your .vimrc. For example, your .vimrc can contain: let g:DoxygenToolkit_blockHeader="--------------------------------------------------------------------------" let g:DoxygenToolkit_blockFooter="----------------------------------------------------------------------------" let g:DoxygenToolkit_authorName="Mathias Lorente" let g:DoxygenToolkit_licenseTag="My own license\<enter>" <-- Do not forget ending "\<enter>" let g:DoxygenToolkit_undocTag="DOXIGEN_SKIP_BLOCK" # default use /**...*/ as comment. With this option /// comments are used. let g:DoxygenToolkit_commentType="C++" let g:DoxygenToolkit_briefTag_funcName = "yes" " to include function name between briefTag_pre and briefTag_post
install details
Copy to your '~/.vim/plugin' directory
rate this script | Life Changing Helpful Unfulfilling
script versions (upload new version) Click on the package to download.
package | script version | date | Vim version | user | release notes
--- | --- | --- | --- | --- | ---
DoxygenToolkit.vim | 0.1.17 | 2007-04-15 | 6.0 | Mathias Lorente | Number of lines scanned is now configurable. Default value is still 10 lines. (Thanks to Spencer Collyer for this improvement).
DoxygenToolkit.vim | 0.1.16 | 2007-02-27 | 6.0 | Mathias Lorente | Bug correction : now, function that returns null pointer are correctly documented (thanks to Ronald WAHL for his report and patch).
DoxygenToolkit.vim | 0.1.15 | 2007-02-11 | 6.0 | Mathias Lorente | Generated documentation with block header/footer activated do not integrate header and footer anymore.
DoxygenToolkit.vim | 0.1.14 | 2006-11-04 | 6.0 | Mathias Lorente | New option available for cinoptions : g:DoxygenToolkit_cinoptions (default value is still c1C1) Thanks to Arnaud GODET for this. Now comment can have different indentation style.
DoxygenToolkit.vim | 0.1.13 | 2005-04-17 | 6.0 | Mathias Lorente | Changes for linux kernel comment style
DoxygenToolkit.vim | 0.1.12 | 2005-03-21 | 6.0 | Mathias Lorente | Fixed indentation in comments (suggested by Soh Kok Hong and required by other users)
DoxygenToolkit.vim | 0.1.12 | 2005-01-27 | 6.0 | Mathias Lorente | Now you can use your own comment tag (not only C or C++). In this case, you have to define: 'g:DoxygenToolkit_startCommentTag', 'g:DoxygenToolkit_interCommentTag' and 'g:DoxygenToolkit_endCommentTag' in your .vimrc file.
DoxygenToolkit.vim | 0.1.11 | 2004-11-22 | 6.0 | Mathias Lorente | The real 0.1.11 version... Sorry for my mistake (thank to Jason Mills who pointed me out this error....)
DoxygenToolkit.vim | 0.1.10 | 2004-06-01 | 6.0 | Mathias Lorente | Bug correction for constructors / destructor and functions preceded by spaces (or tabs).
DoxygenToolkit.vim | 0.1.9 | 2004-05-25 | 6.0 | Mathias Lorente | Fixed filename bug when including doxygen author comment whereas file has not been open directly on commamd line. Now /// or /** doxygen comments are correctly integrated (except for license).
DoxygenToolkit.vim | 0.1.8 | 2004-05-24 | 6.0 | Mathias Lorente | Some changes and bug correction for some configuration (thanks to Jason Mills).
DoxygenToolkit.vim | 0.1.7 | 2004-05-17 | 6.0 | Mathias Lorente | Bug correction in DoxygenUndocumentFunc.
DoxygenToolkit.vim | 0.1.6 | 2004-05-14 | 6.0 | Mathias Lorente | Few code modification and new functionalities
DoxygenToolkit.vim | 0.1.5 | 2004-05-14 | 6.0 | Mathias Lorente | Initial upload

| If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly. Questions about Vim should go to vim@vim.org after searching the archive. Help Bram help Uganda. |  |