code-formatting

Delphi 2010: integrated code formatter disappeared from menu

Hello. How to get back integrated source code formatting back to Delphi? I suppose I disabled some package or something and there is no more an option in Edit menu to format source. What package should I get back installed to have it on again? ...

How to collapse all blocks of #ifdefs that will not be compiled in Visual Studio?

The problem is the following: the codebase have many files with multiple blocks compiled conditionally for each of target platforms using the #if defined(...) directive. Since the typical programmer is working mainly on one of the platforms it is quite hard to read and navigate the code with these large blocks of inactive code blocks eve...

Resharper code format linebreaks

Im trying to setup the code formatting in ReSharper. Limiting each line to a maximum count of characters, it seems to want to place casts on a separate line. Like so: string mystring = (string) MyStringConverter.convert(toconvert, typeof(string), null, null); I cant seem to be able to find the correct combination of settin...

Capitalization of an acronym that starts a parameter

I have a variable that indicates the length of time the UI can be idle. I have elected to call this variable UITimer. I want to pass the variable into my classes constructor and then store it off in a local field. What is the proper way to do the casing of this? We use the common convention of a parameter not being capitalized. So s...

Make 2 doLogs display on the same line.

- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark { [self doLog:[placemark.thoroughfare description]]; [self doLog:[placemark.locality description]]; if ([geocoder retainCount]) [geocoder release]; } Displays as: How can I make this work so that I can display these (thoroughfare & locali...

How can I move some lines to left or right in a simple way? (not n<< or n>>)

I have some lines in a sass file: .menu ul xx: xx li xx: xx a xx: xx .others xx: xx If I want to move the entire .menu part to right for a width of tab, I should use 7>>. It's so boring that I have to count there are how many lines in the .menu. Is there any simple way to do this? I mean, to move a node and its c...

How to make sure that my SQL code is not a scary mess

SQL seems to be the most neglected language when it comes to formatting nicely and readably... And as SQL statements can be incredibly detailed and complex, it makes it extremely hard to work with. But I find that when I try to format my SQL code in the best way possible I'm sometimes unsure of how to do it. I know the standards for Java...

How to Un-format a document in Visual Studio 2008?

So there's a messy XML file where all white spaces between tags have been stripped, so it's a valid XML file but it's somewhat unreadable. I press the magic Ctrl+K, D, and the file is beautifully formatted. I edit it, and then I want to put it back into the compressed, hardly readable state, removing all whitespaces between the tags. H...

Is there a free tool/plugin that can format code ect on the fly for VS C#?

Ive just moved from VB.Net to C#. I dont understand why people are using it/prefer it as it is soo much more time consuming! In VB.NET, you simply type your code and VB.NET formats is as you go, For example: removes unneccessary whitespace, automatically puts in brackets, tabs blocks of code, automatically creates the NEXT, END IF, sta...

Preferred formatting for this / best practice?

Suppose I want to create a select box in PHP. $months = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); Option 1: <select name="month"> <option value="">Month</option> <option value="">-------</option> <?php foreach ($months as $monthNum => $month) { ?> <option value="<?php echo $monthN...

Exclude section in page from IntelliJ code formatting

Hello, Is there any possible way to have IntelliJ -not- format part of a page? I'm using XHTML and facelets but this could apply to any page. I'm also curious if it's possible to do that in code, though that's not as important to me as excluding pat of a page. Thanks. ...

In Eclipse's text editors, is it possible to have tabs not look the same as spaces

Is it possible to set tabs to have a different background color (e.g. slightly grey) or put a little symbol (like "↦") in Eclipse text editors? If it's language specific, I'm using PHP. Our company coding standard is Tabs for indenting, but often there are spaces in the source code, so it would be great to see where these spaces are so ...

Reformatting HTML

I'm not a developer so I don't know the right term for this. I am dealing with code done by other and it is coded in a continuous way. Meaning not like this, <body> <ul> <li>List 1</li> <li>List 2</li> <li>List 3</li> </ul> </body> but instead, like this, continuously: <body><ul><li>List 1</li><li>List 2</l...

c# the best way to format your code

Hi All, What is the best way to format your c# code. I'm looking to improve the way my code is formated. I curentlly put all my code into regions (i.e methods functions ect) Is this the best way or are there other ways that work better? Sp ...

Visual Studio 2005 - Format/Indent javascript and CSS - Any addin?

Hello I hate code that is not indented. But i'm using Visual Studio 2005 for a web app project in asp.net. Is there any VS 2005 add-in that can help me to format javascript/css/asp markup in one key stroke like the native Ctrl K + Ctrl D in Visual Studio? Thank you NLV ...

C++ Type casting order / Proper code-formatting?

Possible Duplicates: Declaring pointers; asterisk on the left or right of the space between the type and name? what is the difference between const int*, const int * const, int const * I've been wondering what is the difference between: float const &var const float &var And which one of these is the correct way of writin...

Possible to use [Obsolete] .NET 1.1 API to format source code for viewing on the web? (...Or any other API)

I'd like to get some source code properly formatted (indents) and color coded to either VS2010 or Eclipse color coding and formatting for display in a browser. I have various languages (.NET, Java, JavaScript, CSS, XML) and can't find any free software that will do this. I vaguely remember an obsolete API that was used in .Net Framewor...

Stop IntelliJ from wrapping lines

In the JIndent formatter you can add "special" comments that prevent the formatter from processing a group of lines (//J-, //J+, if I remember correctly). Is there an equivalent for the built-in formatter in IntelliJ IDEA (9.0.3 CE)? I'm normally very anal about my code style :-), but one of my colleagues is writing a chunk of SQL (in S...

How to selectively disable IntelliJ IDEA code formatter with comments?

I'd like to selectively disable the IntelliJ IDEA code formatter for a portion of code just like I can in Eclipse. Does IntelliJ support this feature, and if so, how do I use it? ...

Code polisher / reformater for C, C++ or Fortran

Hello, suppose you have got a bunch of files written in C, C++ or Fortran, by different authors with different opinions on formating, how to comment (...) and so on. I think many people know situations like these. Are there any free tools for ends like: uniform format of code (indent etc.) create standard comment bodies rename variab...