We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
对于 Fortran,有 plusFORT,它可以做比您要求的更多的事情,例如重新组织代码以及从 FORTRAN 77 到 Fortran 90 的转换。请参阅 http://www.polyhedron.com/pf-plusfort0html 和 http ://www.polyhedron.com/pflinux0html
For Fortran there is plusFORT, which can do much more than what you ask for, such as reorganizing code and translating from FORTRAN 77 to Fortran 90. See http://www.polyhedron.com/pf-plusfort0html and http://www.polyhedron.com/pflinux0html
用于 Eclipse 的 CDT 插件具有出色的 C/C++ 格式化和重构工具。
格式化程序可以定制以满足几乎所有需求。
此外,重构工具非常强大,使用它们重命名变量、类等是一项简单而安全的任务。 (他们使用索引器/解析器来识别变量的范围,因此这不是简单的搜索和替换。注释中的匹配模式也可以自动更改)。
但是,据我所知,不可能进行批处理。
编辑:另一个明显的缺点是,您必须创建一个项目才能使索引器(以及重构工具)工作。因此,至少您必须将所有包含路径和重要的编译器定义添加到项目设置中。
我从未尝试过,但索引器应该在没有真正可用的编译器的情况下正常工作,但可能有必要使项目使用“内部构建器”,否则您无法设置包含路径。 (我对此不确定,因为我在项目中使用带有 gcc 的内部构建器 - 这工作得很好。)
The CDT Plugin for Eclipse has great formatting and refactoring tools for C/C++.
The formatter can be customized to fit almost all needs.
Also the refactoring tools are quite powerful and renaming variables, classes etc. is an easy and safe task with them. (They use the indexer/parser to recognize scope of variables, so its not a simple search and replace. Matching patterns within comments can be changed automatically, too).
However, as far as I know there is no batch processing possible.
Edit: Another - obvious - drawback is, that you have to create a project to make the indexer (and thus the refactoring tools) work. So at least you have to add all include paths and important compiler defines to project settings.
I never tried, but the indexer should work fine without a real compiler available, but it may be necessary to make the project to use the "internal builder", otherwise you cannot set include paths. (I'm unsure about this, because I use the internal builder with gcc in my projects - this works fine.)
我使用了 Uncrustify 和 UniversalIndentGui 用于格式化 C++ 代码。它运作得很好。 Uncrustify 提供了许多自定义选项,UniversalIndentGui“提供了用于设置几乎所有压头参数的实时预览。您可以更改参数的值,并直接查看重新格式化的代码的外观。”
I've used Uncrustify with UniversalIndentGui for formatting C++ code. It works pretty well. Uncrustify offers many customization options and UniversalIndentGui "offers a live preview for setting the parameters of nearly any indenter. You change the value of a parameter and directly see how your reformatted code will look like."
看看
AStyle。它是一个基于命令行的格式化程序/美化程序。它不处理 Fortran,但它适用于 C、C++、C# 和 Java
Have a look at
AStyle. It's a command line based formatter/beautifier. It doesn't handle Fortran though it works with C, C++, C# and Java
您可以查看
indent
(unix) 命令。它并不能满足你所要求的一切,但我认为这是一个好的开始You can have a look at the
indent
(unix) command. It doesn't do everything you are asking for , but that's a good start I think