The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Linux code beautifiers

Questions:

1. What is your preferred code beautifier on Linux?

2. What are the configuration settings you use for the tool? Posting the config settings text here would be great!

Thanks!
HJ
Wednesday, January 31, 2007
 
 
Oh, the language in question is C++.
HJ
Wednesday, January 31, 2007
 
 
vim.  tabstop of 4.  expand tabs with spaces.

gg=G

Done.
none Send private email
Wednesday, January 31, 2007
 
 
You might be OK with Artistic Style (http://sourceforge.net/projects/astyle/), which is the best of the free versions out there (although we weren't).

The best I've seen is Source Styler (http://www.ochresoftware.com/), although it is Windows-only and commercial.
BillT Send private email
Wednesday, January 31, 2007
 
 
I had a bit of a play with Uncrustify and it looks pretty good to me:

http://www.zeusedit.com/forum/viewtopic.php?t=1044
Jussi Jumppanen
Wednesday, January 31, 2007
 
 
Emacs
...
Thursday, February 01, 2007
 
 
XEmacs  (or Emacs)

Some settings for your c-mode-common-hook:

(c-set-style "ellemtel") ;; There are other choices
(setq c-basic-offset 4)
(font-lock-mode 1)
(setq require-final-newline t)

Plus whatever for your tab/indent preferences, e.g.:
(setq indent-tabs-mode nil)
(setq c-tab-always-indent t)
EMF
Thursday, February 01, 2007
 
 
"1. What is your preferred code beautifier on Linux?"

Jussi,

This Zeus app you posted is for Windows. He needs a tool for Linux.
Tim Patterson Send private email
Thursday, February 01, 2007
 
 
> This Zeus app you posted is for Windows. He
> needs a tool for Linux.

Zeus is not a code beautifier, it’s an IDE and yes it does only run on Windows.

But the link I posted was NOT for Zeus. It was for "Uncrustify" which is a SourceForge project and the last time I looked it ran on these operating systems :

32-bit MS Windows (NT/2000/XP)
All POSIX (Linux/BSD/UNIX-like OSes)
Jussi Jumppanen
Thursday, February 01, 2007
 
 
I have a question about writing a function to do this (for any given language).

If you were going to do it, would you try to do it *without* generating a language parser first? Do you think it could be done with straight string analysis?
Wayne B Send private email
Thursday, February 01, 2007
 
 
EMF:  Yep, those are pretty much my settings to the letter.  Though I also add:

(c-set-offset 'inclass '+)
Boojum
Friday, February 02, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz