/* Suppose I have a multi-line comment with hard line-breaks
* that are roughly uniform on the right side of the text,
* and I want to add text to a line in order to make the
* comment a bit more descriptive.
*/
现在,最不幸的是 ,我需要向 之一添加文本顶部 线。
/* Suppose I have a multi-line comment with hard line-breaks (here is some added text for happy fun time)
* that are roughly uniform on the right side of the text,
* and I want to add text to a line in order to make the
* comment a bit more descriptive.
*/
修复每条线需要 O(n) 时间(n 是行数),以便它们再次大致对齐。计算机应该这样做,而不是我。
在我们的 IDE 中是否有工具可以处理这个问题?他们叫什么?
最佳答案
emacs 支持命令 fill-paragraph
通常映射到 meta-q
.
来自 fill-paragraph
的输出在你的第二段文字上:
/* Suppose I have a multi-line comment with hard line-breaks (here is
* some added text for happy fun time) that are roughly uniform on the
* right side of the text, and I want to add text to a line in order
* to make the comment a bit more descriptive.
*/
关于visual-studio - IDE 中是否有任何工具可以自动修复注释格式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2403191/