LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1435|回复: 10

Linux下有没有C++源代码对齐和美化的工具?

[复制链接]
发表于 2005-1-14 16:11:30 | 显示全部楼层 |阅读模式
Linux下有没有C++源代码对齐和美化的工具?
如果没有,win下的也行,最好在wine下能跑。
发表于 2005-1-14 16:14:49 | 显示全部楼层
The `indent' program changes the appearance of a C program by
inserting or deleting whitespace.
.
`indent' also provides options for controlling the alignment of braces and
declarations, program indenting, and other stylistic parameters, including
formatting of both C and C++ comments.
回复 支持 反对

使用道具 举报

发表于 2005-1-14 16:25:07 | 显示全部楼层
indent 不错


另外 , vim , gvim 可以配置自动处理代码缩进
回复 支持 反对

使用道具 举报

发表于 2005-1-14 22:42:58 | 显示全部楼层
非编辑模式下,敲击如下命令。
gg=G
试试
回复 支持 反对

使用道具 举报

发表于 2005-1-14 22:57:01 | 显示全部楼层
VIM不就很好用吗?
回复 支持 反对

使用道具 举报

发表于 2005-1-14 23:12:48 | 显示全部楼层
我一般使用 Vim 的 GUI 界面 gvim



kvim 还是不支持中文




命令
gg=G
功能不太强,在我的 gvim 里无法处理没有换行的代码
有时侯还是得用 indent
回复 支持 反对

使用道具 举报

发表于 2005-1-14 23:14:25 | 显示全部楼层
命令

:%!indent
回复 支持 反对

使用道具 举报

发表于 2005-1-15 13:59:21 | 显示全部楼层
我平时也是gvim,只在一个情况下用indent,就是多人合作的开发项目中,commit前用indent来统一一下大家的编程排版风格
回复 支持 反对

使用道具 举报

发表于 2005-1-15 19:03:48 | 显示全部楼层
一般情况用终端的vim
回复 支持 反对

使用道具 举报

发表于 2005-1-15 23:46:19 | 显示全部楼层
eclipse可以对齐C++代码吧。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表