在Linux下的Emacs用户code格式化/美化 [英] Code formatter / beautifier for C on Linux for Emacs user

查看:352
本文介绍了在Linux下的Emacs用户code格式化/美化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个Linux用户寻找一个code美化将于含C code文件和格式化他们的规范。具体来说,我期待:

I'm a Linux user looking for a code beautifier which will take files containing C code and format them to specification. Specifically, I'm looking to:


  • 将所有缩进是8个空格

  • 格式code一贯

  • 添加换行符始终

如果它有两个默认设置,自定义功能这将是很好。我preFER时可自由/开源解决方案。有什么建议么?

It would be nice if it had both defaults and the ability to customize. I prefer free / open source solutions when available. Any suggestions?

更新:我还应该注意到比我一个Emacs用户,所以这可能是一个Emacs具体的问题。我已经更新了标签,以反映这一点。

UPDATE: I should also note than I'm an emacs user, and so this may be an emacs specific question. I've updated the tags to reflect this.

推荐答案

的astyle 是值得一试。

这篇关于在Linux下的Emacs用户code格式化/美化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆