Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize Doxygen comments #7

Open
ukos-git opened this issue Dec 31, 2019 · 2 comments
Open

Recognize Doxygen comments #7

ukos-git opened this issue Dec 31, 2019 · 2 comments

Comments

@ukos-git
Copy link

I would like to recommend adding doxygen comments to the ftplugin. This allows convenient line breaking and text flowing using gwap in normal mode with comments in formatoptions formatoptions+=c enabled.

/// @brief Write the data of a single channel to the NWB file
///
/// @param locationID      HDF5 file identifier
/// @param path            Absolute path in the HDF5 file where the data should be stored
/// @param version         major NWB version
/// @param p               Filled #IPNWB::WriteChannelParams structure
/// @param tsp             Filled #IPNWB::TimeSeriesProperties structure
/// @param compressionMode [optional, defaults to NO_COMPRESSION] Type of compression to use, one of @ref CompressionMode

this is conveniently reflown using vip and gwap.

/// @brief Write the data of a single channel to the NWB file
///
/// @param locationID      HDF5 file identifier
/// @param path            Absolute path in the HDF5 file where the data should
///                        be stored
/// @param version         major NWB version
/// @param p               Filled #IPNWB::WriteChannelParams structure
/// @param tsp             Filled #IPNWB::TimeSeriesProperties structure
/// @param compressionMode [optional, defaults to NO_COMPRESSION] Type of
///                        compression to use, one of @ref CompressionMode

My current vimrc to make this happen looks like this:

set formatoptions=tcqornj
set formatlistpat+=\\\|^@param\\s\\+\\w\\+\\s\\+
if has("autocmd")
  augroup fileTypeCustom
  autocmd!
    autocmd FileType igorpro
      \ setlocal nospell |
      \ setlocal comments+=b:///
  augroup END
endif

Would it be possible to add the following lines to the ftplugin?

set comments+=b:///
set formatlistpat+=\\\|^@param\\s\\+\\w\\+\\s\\+
@ukos-git
Copy link
Author

could also be extended to match the @brief keyword.

@t-b
Copy link
Owner

t-b commented Jan 2, 2020

@ukos-git Go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants