我试图通过我编写的一些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
并获取此信息:
/**
* \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中这样做,但我似乎无法弄明白。