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.

How to remove tabs from blank lines using sed?

I'd like to use sed to remove tabs from otherwise blank lines. For example a line containing only \t\n …

tabs sed code-formatting blank-line
Intellij IDEA, format all code in a project

I really like IDEA's code formatting, but how do I get it to reformat all the code in a particular …

java intellij-idea code-formatting
Unnecessary curly braces in C++?

When doing a code review for a colleague today I saw a peculiar thing. He had surrounded his new code …

c++ code-formatting
I'm getting an IndentationError. How do I fix it?

I have a Python script: if True: if False: print('foo') print('bar') However, when I attempt to run my …

python exception error-handling indentation code-formatting
How to customize Eclipse's text editor code formatting

How can I set my Eclipse's code formatter to allow code rows longer than 80 characters. I know that very long …

eclipse code-formatting code-standards
How to set Python language specific tab spacing in Visual Studio Code?

Using VSCode 1.9.0 with the (donjayamanne) Python 0.5.8 extension, is it possible to provide Python specific editor options? Or more generally speaking, …

python configuration visual-studio-code code-formatting vscode-settings
How to blog code at wordpress.com

got a new blog at wordpress few days ago (http://ghads.wordpress.com) and I want to post some code …

blogs code-formatting wordpress.com
Displaying code snippets in Sharepoint wiki

Is there a way to get SharePoint to display code snippets in a pre-formatted way? Currently if you insert any …

sharepoint code-formatting
XML attributes order in Android Studio

I'm facing problem with keeping proper order of XML attributes in Android Studio. As you can see below, the style …

android-studio code-formatting
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 …

c++ code-formatting