我正在尝试浏览我写的一些 doxygen 评论并重新格式化这些行以使其更具可读性gq
- 所以我有这样的东西。
/**
* \brief This is a brief description of the function that is made a little longer for the purposes of this example.
*
* \param[in] p1 A parameter with a really long description describing it in excruciating detail.
* \param[in] p2 Another parameter with a really long description describing it in excruciating detail.
*
* \return Nothing.
*/
然后我gq
用smartindent
set 完成它并得到这个:
/**
* \brief This is a brief description of the function that is made a little
* longer for the purposes of this example.
*
* \param[in] p1 A parameter with a really long description
* describing it in excruciating detail.
* \param[in] p2 Another parameter with a really long description
* describing it in excruciating detail.
*
* \return Nothing.
*/
但我真正想要的是:
/**
* \brief This is a brief description of the function that is made a little
* longer for the purposes of this example.
*
* \param[in] p1 A parameter with a really long description
* describing it in excruciating detail.
* \param[in] p2 Another parameter with a really long description
* describing it in excruciating detail.
*
* \return Nothing.
*/
我觉得应该有一种快速的方法可以在 vim 中执行此操作,但我似乎无法弄清楚。