code-formatting

Is there any tool for reformatting C# code?

I am looking for a (preferably) command-line tool that can reformat the C# source code on a directory tree. Ideally, I should be able to customize the formatting. Bonus points if the tool can be run on mono (or linux). ...

C Code formatting/beautification tool..

When working on large code base with large team, its real challenge to maintain code quality and coding style. well, controlling code quality is a huge topic on its own. But control of code style could be simplified with a tool. We started using indent. Its real neat tool with huge set of options to configure. In the beginning we were ...

How to blog code at wordpress.com

Hi, got a new blog at wordpress few days ago (http://ghads.wordpress.com) and I want to post some code snippets now or then. Is there anyway to make it look like code without paying for extra plugins? Thanks a lot! ...

Truncating Method calls

This is a subjective question as I want to gauge if it's worth me moaning at my co-workers for doing something which I find utterly detestable. The issue is that a bunch of my co-workers will truncate method calls to fit a width. We all use widescreen laptops that can handle large resolutions (mine is 1920x1200) and when it comes to deb...

Free Software or Scripts for Formatting SQL Queries

I'm looking for a script or application that tidies up and reformats SQL queries. I've found some good online SQL formatters (see here) , as well as some downloadable commercial applications. I'm cautious about using an online service as I don't want to risk copies of these queries being stored somewhere they might be compromised, if on...

Is the Open Source Jalopy Eclipse plugin compatible with Ganymede?

After much searching, I found the download for the eclipse version of jalopy. Is this compatible with Eclipse 3.4? It's dated 2006. I've copied the extracted folder to my plugins directory and run eclipse -clean, but I can't find anything matching 'jalopy' in preferences. If it's not compatible, are there any (free) alternatives? ...

Eclipse: Can you format code on save?

In Eclipse, under Windows -> Preference -> Java -> Code Style, you can define code templates for comments and code, and you can setup a code formatter. I'm wondering if it is possible in Eclipse to have these setting take affect every time I save a source file. Basically, instead of me highlighting everything and pressing Ctrl+Shift+F, ...

Pasting source code in word 2007

If i try to paste source code in word 2007 the spacing between the lines seems to get messed up as all new lines are spaced way apart compared to a programming text editor. Can somebody tell me how to paste source code in word 2007 preserving the formatting and the spacing between lines? ...

Visual Studio code formatting

Hi, I've been using Visual Studio as my main IDE for a while now (I still use Emacs for some personal projects, though). I like the way Emacs formats C/C++ code and I'd like to convince Visual Studio use similar conventions for C# code. For instance, in Emacs, a C function call looks like: functionName(argument1, argument...

How do you format your Compound Statements in Delphi and C#?

As a long time Pascal and Delphi developer, I always line up my begin and ends thus : begin if x = y then begin ... ... end else for i := 0 to 20 do begin ... ... end; end; What drives me nuts is code formatted thus : begin if x = y then begin ... ... end else for i := 0 t...

How should I order the members of a C++ class?

Is it better to have all the private members, then all the protected ones, then all the public ones? Or the reverse? Or should there be multiple private, protected and public labels so that the operations can be kept separate from the constructors and so on? What issues should I take into account when making this decision? ...

How would you format/indent this piece of code?

How would you format/indent this piece of code? int ID = Blahs.Add( new Blah( -1, -2, -3) ); or int ID = Blahs.Add( new Blah( 1,2,3,55 ) ); Edit: My class has lots of parameters actually, so that might effect your response. ...

Automatically reformatting inherited PHP spaghetti code

I've taken over a mixed PHP4/PHP5 project which has been handed down from developer to developer, with each one making things worse. Before I spend too much time on it I'd like to develop a base-standard, with consistent formatting at a minimum. Can anyone recommend a utility (Linux or Mac OS X preferably) that will reformat the code? ...

SQL string formatter

Does anyone know of a program, a utility, or some programmatic library, preferably for Linux, that takes an unformatted SQL string and pretty prints it? For example I would like the following select * from users where name = 'Paul' be changed to something like this select * from users where name = 'Paul' The exact formatting i...

Displaying code snippets in Sharepoint wiki

I think I already know the answer, but is there a way to get sharepoint to display code snippets in a pre-formatted way? Currently it just looks like text and anything would be better than nothing. Thanks. ...

Delphi code formatter

Are there any utilities that reformat Delphi code ? EDIT I am using Delphi 2006 Some feedback Thanks to all that answered this question I have been using the JCF code formatter - it works well and my code is been formated to Object Pascal Style Guide ...

What's a good way to view dojo's javascript source files in Eclipse with Aptana?

I have Aptana installed within Eclipse. I'm working on a project with the dojo 1.2 JavaScript library installed. When I open one of dojo's dijit .js files, the code is formatted in a rather difficult to read way. The Eclipse "Outline" view shows a list of functions with names like "_2" and "ew". Not very human friendly. I'm talking a...

Is there a windows utility similar to HTML Tidy for Javascript

I want to cleanup some javascript files and reformat them with nice indents, etc, Any recommendations for utilities to do this under Windows ...

Is there a way to get Visual Studio 2008 to stop formatting my AutoProperties?

In Visual Studio 2008's Options > Text Editor > C# > Formatting, I have the following settings ticked. Automatically format completed statement on ; Automatically format completed block on } This is really helpful for when I'm writing a method or a for/foreach/while/if statement. ie if I write void MyMethod(){} I want it to refo...

Lisp Code Formatting

One of the people who took the time to comment on my other question about Clojure/LISP syntax pointed out that I had not written my sample code in the standard LISP way. So he was kind enough to rewrite the code snippet and that's a big help. But it raised another question in my mind. Why would this: (if (= a something) (if (= b ot...