Questions tagged [autoformatting]

A software feature commonly found in word processor programs such as Microsoft Word that automatically changes the formatting or appearance of text.

A software feature commonly found in word processor programs such as Microsoft Word that automatically changes the formatting or appearance of text. For example, if a user types "1st", AutoFormat would change this to "1st."

213 questions
8
votes
1 answer

Disable Resharper auto-formatting around certain blocks of code

In my C# development team, we want to share auto-formatting rules to respect our coding standards to have unified code formatting. I'm actually testing ReSharper and it's great but we have one rule in our standards that I can't seem to get…
William Fortin
  • 777
  • 1
  • 4
  • 17
8
votes
2 answers

Visual Studio Auto-Format Broken

I'm running Visual Studio 2008 sp1 on Windows 7 Build 7100 32bit. I've never had this problem before, even on different installs of Windows 7 RC. when I finish a statement with a ';' or '}' or something, normally VS will auto format that line or…
Joel
  • 15,576
  • 16
  • 69
  • 92
7
votes
1 answer

Netbeans : Auto Format : prevent it for a section of my code

I use Netbeans auto format (ctrl+alt+f) a lot. It's a very nice function!. But I use StringBuffer.append() to generate some xml. I indent the .append parameter to represente the node structure of my xml. msg.append("
Loda
  • 1,950
  • 2
  • 20
  • 37
7
votes
2 answers

Autoindent and in VSCode

VSCode's formatter doesn't indent and tags by default. In the default settings the following lines exists: // Indent and sections. "html.format.indentInnerHtml": false, I tried setting html.format.indentInnerHtml in the…
zabbarob
  • 1,080
  • 2
  • 11
  • 23
7
votes
6 answers

If it is possible to auto-format code before and after a source control commit, checkout, diff, etc. does a company really need a standard code style?

If it is possible to auto-format code before and after a source control commit, checkout, diff, etc. does a company really need a standard code style? It feels like standard coding style debates that have been raging since programming began like…
dennisjtaylor
  • 886
  • 1
  • 6
  • 16
6
votes
2 answers

Programmatically format XML in indented form just like Visual Studio's auto-format

I haven't found a way using .NET's XmlWriter and associated XmlWriterSettings to format an XML string in indented form exactly the way that Visual Studio does it with its auto-format command (Ctrl-E Ctrl-D, or, depending on keyboard mapping, Ctrl-K…
Erhhung
  • 903
  • 9
  • 13
6
votes
2 answers

Eclipse is making nice looking JSF code (XHTML) unreadable by autoformating

I have the problem that if I autoformat a XHTML file (JSF 1.2) in Eclipse with the keys CTRL + SHIFT + f, the output looks really bad and is not really readable anymore. My formated code:
Joergi
  • 1,593
  • 2
  • 36
  • 74
5
votes
1 answer

How to ignore space after comments when calculating indent level in Vim

Consider writing a JavaDoc-style comment which includes an indented list (when expandtab is set and softtabstop=2): /** * First line: * - Indented text */ Currently, after typing First line: and hitting return, Vim will correctly insert…
David Wolever
  • 130,273
  • 78
  • 311
  • 472
5
votes
2 answers

How to order HTML attributes alphabetically on Visual Studio automatically?

I have Note that the attributes are unordered. I want a tool that orders the attributes in the…
Jader Dias
  • 81,082
  • 147
  • 410
  • 611
5
votes
1 answer

Exclude section of code from code formatting

Is there a comment tag in which I can enclose a section (of php code) which the auto formatter will ignore? Sometimes I use a unique indention style for a tricky section of php code. For example if I pass several arrays i initialize in-line. It is…
Johan
  • 356
  • 2
  • 4
  • 16
5
votes
2 answers

How do I remove auto paragraph formatting for pages ONLY, and not posts (WordPress)

I'm familiar with this little trick already for removing auto paragraph formatting in WordPress: remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); ...however adding this in functions.php removes paragraphs for…
straubcreative
  • 167
  • 1
  • 13
5
votes
1 answer

Visual C++ keeps destroying my code formatting alignment

I'm working on an open source project that uses horizontal alignment in source code. The code is written in C++, and I'm using Visual Studio 2013. Visual Studio tries to be smart concerning spacing, but ends up destroying my manual alignment. A…
5
votes
1 answer

Autoformat Javascript in Netbeans IDE

Are there any known Plugins or ways to properly autoformat Javascript in Netbeans IDE?
mayrs
  • 2,164
  • 2
  • 23
  • 34
4
votes
3 answers

Visual Studio 2010 Auto-Formatting

I have the Productivity Power Tools extension installed on my machine, as well as VS 2010, but I seem to have developed a mysterious issue. The IDE no longer auto-formats code when I enter a ; or } which is quite annoying, I made particular use of…
Joe
  • 1,194
  • 2
  • 14
  • 31
4
votes
2 answers

Auto formatting in VIM for PHP

I want to be able to take the following code if ($something) { do something } and make it if ($somthing) { do something } through out a whole file without really going to each statement and correcting it. I am not a regex guru so any…
Stephan Grobler
  • 449
  • 1
  • 5
  • 17
1 2
3
14 15