Fra*_*rth 7 eclipse ide comments netbeans visual-studio
/* 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.
*/
Run Code Online (Sandbox Code Playgroud)
现在,最不幸的是,我需要在其中一个顶行添加文本.
/* 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.
*/
Run Code Online (Sandbox Code Playgroud)
它需要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.
*/
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
137 次 |
最近记录: |