C on Linux for Emacs用户的代码格式化程序/美化器 [英] Code formatter / beautifier for C on Linux for Emacs user

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

问题描述

我是一个Linux用户,寻找一个代码美化器,它将采用包含C代码的文件并将其格式化为规范。具体来说,我正在寻找:

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个空格

  • 格式化块的代码一致

  • 一致添加换行符

如果它有两个默认值和定制的能力。我喜欢可用的免费/开源解决方案。有什么建议么?

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 值得一看。

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

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