Top "Code-formatting" questions

Code formatting is the way to format the source code of programs,using spaces and tabs, improving legibility of source code.

Ruby code beautification, split long instructions on multiple lines

How can we write the following statement to improve readability? Promotion.joins(:category).where(["lft>=? and rgt<=?", c.…

ruby code-formatting
Eclipse Javascript formatter (ctrl-shift-f)

I don't like asking this question but I have honestly been looking for a way to figure this out for …

javascript eclipse code-formatting
Sorting methods in Eclipse

Is there an easy way to sort methods within a class in Eclipse?

eclipse code-formatting
How to generate an Eclipse formatter configuration from a checkstyle configuration?

I have a checkstyle configuration XML file and want to automatically generate an Eclipse formatter configuration from this. Is there …

java eclipse code-formatting checkstyle
editing the NetBeans source formatting standard

Is there any way of changing the standard by which NetBeans automatically formats the code when doing "Source->Format"? …

php netbeans code-formatting indentation auto-indent
ReSharper Line Breaks and Wrapping

So, this: cmd = new OdbcCommand( string.Format( @" SELECT * FROM Bobby_Tables WHERE Name = {0}", "Little Bobby Drop Tables" ), odbcConnection ); gets formatted …

c# resharper code-formatting
Split Ruby regex over multiple lines

This might not be quite the question you're expecting! I don't want a regex that will match over line-breaks; instead, …

ruby regex code-formatting
Indenting #defines

I know that #defines, etc. are normally never indented. Why? I'm working in some code at the moment which has …

c coding-style indentation c-preprocessor code-formatting
Disable Visual Studio code formatting in Razor

This has been asked before: Why doesn't Visual Studio code formatting work properly for Razor markup? But that question is …

visual-studio razor code-formatting
Formatting PHP Code within Vim

I'm currently using Vim as a lightweight IDE. I have NERDTree, bufexplorer, supertab, and ctags plugins which do almost everything …

php vim code-formatting tidy