Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio IDE中是否有自动修复注释格式的工具?_Visual Studio_Eclipse_Ide_Netbeans_Comments - Fatal编程技术网

Visual studio IDE中是否有自动修复注释格式的工具?

Visual studio IDE中是否有自动修复注释格式的工具?,visual-studio,eclipse,ide,netbeans,comments,Visual Studio,Eclipse,Ide,Netbeans,Comments,现在,最不幸的是,我需要在顶部的一行添加文本 /* 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. */ 修复每一行需要O(n

现在,最不幸的是,我需要在顶部的一行添加文本

/* 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.
 */
修复每一行需要O(n)个时间(n是行数),以便它们大致再次对齐。计算机应该做这个,不是我


在我们的IDE中有处理这个问题的工具吗?它们被称为什么?

emacs支持命令
fill paragration
,该命令通常映射到
meta-q

从文本第二段的
填充段落
输出:

/* 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.
 */
Eclipse内置了这个功能(至少,我认为这是您想要的)。当您键入注释时,然后键入Ctrl+Shift+F,它将格式化您的所有代码,或仅格式化您突出显示的代码部分


我现在刚刚测试了它,它为我调整了我所有的评论。

我认为他正在寻找一种解决方案,来改变线条长度,而不是仅仅将它们对齐,这样它们大部分在右侧对齐,同时在左侧精确对齐。@Jacob G-啊,我不明白这一点。好电话。(看起来Peter也经历了与我相同的思考过程。)不幸的是,我不使用emacs,但看起来这是唯一支持这种东西的编辑器。在我的大部分java开发中,我使用IntelliJ。不过,我还是会抽出emacs来完成一些emacs真正擅长的任务。Polystyle目前还没有做到这一点,但可能值得一看,它承诺将用于未来的一个版本:
/* 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.
 */