code-formatting Questions

13

Solved

How do you auto-format code in Eclipse?
Herminiahermione asked 27/3, 2013 at 9:9

1

If a Javascript (or Typescript) function signature has multiple lines of arguments (can happen easily in Typescript, with longer type names), Visual Studio Code indents like this after I hit return...

3

Solved

I can't figure how to Android Studio handle the styling of the foreach live template by putting it on two line like this: for ( : ) { } In the Editor -> Live templates -> Android -&gt...

1

Solved

As I understand, built-in rearranger sort members of the class by access, final and static modifiers, but not alphabetically. Recommended for this plugin rearranger is definitely outdated (last upd...
Eyesore asked 25/10, 2018 at 22:22

1

I am a newbie to Flutter and I am happy to try this great technology. And I am going to try to follow this example https://medium.com/flutterpub/flutter-auth-with-google-f3c3aa0d0ccc to do a Googl...
Costanza asked 3/3, 2019 at 14:10

5

Solved

The CDT code formatter has a pretty decent selection of options, but it doesn't seem to have to a feature that allows one to tell it to ignore a block of code. This feature exists in the Java code ...
Spangle asked 2/6, 2013 at 20:16

1

Solved

I've got some python code for which I'd like to disable formatting. I know in java and with intellij you can achieve this by doing: // @formatting:off code that doesn't get formatted // @format...
Rempe asked 18/2, 2019 at 14:41

4

Solved

I have several hundreds of horribly indented PHP files with mixed tabs and spaces (and even mixed line endings, I suppose) I would like to fix them with php-cs-fixer v2+. I have configured php-cs-...
Dosage asked 19/9, 2017 at 16:32

3

Solved

I am using cURL 7.39.0 to call a REST webservice and write the response to a .json file: curl -L-X POST -b cookies.txt -H "Content-Type: application/json" http://localhost:7001/web/servic...
Quodlibet asked 19/11, 2015 at 7:32

0

I have some C++11 code with clang-format rules that uses an normal indent (IndentWidth) of 4 and continuation indent (ContinuationIndentWidth) of 8. So a long function looks something like this: /...
Guiltless asked 10/1, 2019 at 11:26

2

Solved

PyCharm's Option + Command + L to format HTML, or Python files is very convenient, but it doesn't seem to work for JS, is this an option?
Fondle asked 17/10, 2016 at 21:40

0

I'm currently experimenting with the Black code formatter for Python. In >90% of the cases I am happy with the output (with default configs), but it regularly happens, that it formats some li...
Grasshopper asked 27/12, 2018 at 20:22

2

I've got an NSIS script that is a couple thousand lines and not properly indented making the script difficult to read. Is there a way to format NSIS script or at the minimum be able to indent...
Taxdeductible asked 15/9, 2015 at 8:50

3

Solved

Previously I am fairly certain that the "Encapsulate Field" command would turn something like the following: public int SomeNumber; into the following (what I want from VS 2015): private int so...
Cryptology asked 28/7, 2015 at 21:22

2

Solved

My team wants to share our code styling and formatting. We've been using Resharper for this and wanted to take advantage of the new native features in VS2017! What is the best way to do this?

2

Solved

So far after installing the C++ extension tool, I can use Ctrl + K + F to auto-format my C++ code. However, I would like to make some modification, for example I would like to force the pointer ali...
Gabbie asked 5/9, 2018 at 15:28

4

Solved

I really like IDEA's code formatting, but how do I get it to reformat all the code in a particular project without going through each file? I've found the option to tidy / optimise imports on code ...
Killerdiller asked 12/3, 2011 at 16:32

2

Solved

When I press Ctrl + Alt + L, IDEA removes unused import. I want to turn this feature off, leave the unused imports there. Where can I affect this setting?
Clancy asked 18/2, 2012 at 22:17

1

Solved

I'm trying to figure out how to install the stand alone Clang-Format tool. I've downloaded the pre build binaries for Clang from the official download page for my OS (Fedora 27). However I failed...
Tourane asked 6/8, 2018 at 15:27

2

Solved

I have found other duplicates of this question, but they are very old and the solutions are not applicable to R#8, because the settings have changed. When I do anonymous type or object initializat...
Manned asked 27/11, 2013 at 15:30

3

Solved

Are there any command line (not interactive, not web-based) tools that will reformat (pretty-print) PHP and Javascript code?
Overhaul asked 8/8, 2009 at 16:57

2

Solved

In my java code formatter, in my profile I have (actually it's the eclipse's default) all choices in the "braces" tab set to "same line". Nevertheless when I have a piece of code like this: inter...
Symploce asked 19/10, 2011 at 10:58

11

Solved

I have been looking over the Python documentation for code formatting best practice for large lists and dictionaries, for example, something = {'foo' : 'bar', 'foo2' : 'bar2', 'foo3' : 'bar3'........
Sabbat asked 21/10, 2010 at 8:27

3

Solved

What's the accepted style in Python to format multiple lines of code that are method calls? my_obj.call(x,y).multiple(*args).methods([1,2,3]) With implicit line breaks after brackets/parentheses...
Leiker asked 4/6, 2018 at 9:38

3

Solved

I would like to change the yellow background color of the Razor tags in VS12.
Lezlielg asked 18/3, 2013 at 11:11

© 2022 - 2024 — McMap. All rights reserved.