code-formatting Questions

4

Solved

Looking for a command line code formatter that can be used for bash code. It must be configurable and preferably usable from command line. I have a big project in bash, which I need to use Q in m...
Grani asked 21/8, 2012 at 0:11

5

I've included a 3rd party .cs file in my code. It doesn't comply with StyleCop's rules but I desperately need to be able to exclude it from StyleCop's checks but none of the methods I've found so f...
Architecture asked 30/5, 2013 at 16:51

2

Solved

I am using prettier with VSCode, How can I configure it to format my code like this : function test() { if() { MYCODE GOES HERE; } } I want the { and } on new lines, and an empty line...
Jacket asked 29/3, 2020 at 14:4

5

Solved

I am using Android studio to develop a flutter app, when I click reformat code with dart format it breaks in unpleasing format. Even though there is lot of space it breaks the line, how can i inc...
Adeline asked 16/11, 2019 at 11:58

11

Solved

How can I format code in Xcode like in Eclipse or NetBeans? I have not found any options in the menu. Is there a hot key for this, or is it simply not available in Xcode?
Treasury asked 2/10, 2009 at 17:37

24

Solved

I have started developing with Android Studio. In Eclipse I was using Ctrl + Shift + F, but in Android Studio it does not work. It will be different. How can I jump to any method in a .java file? ...
Apanage asked 16/5, 2013 at 6:10

7

In Emacs, how can I enforce a maximum line length of, say, 80 characters? I want it to insert proper line breaks in my code, much like fill-paragraph for text, if possible, with the correct inserti...
Desmid asked 7/4, 2009 at 1:39

2

Preface: This question is not a duplicate of this one: switch case indentation This question is also not opinion-based. I am not seeking the "best" style. I am not asking what is the "right" thin...
Meza asked 10/3, 2018 at 3:53

3

How can I disable code formatting for a specific block of code in Visual Studio 2017 (C# 7)? I have this method: public CarViewModel(ICarsRepo carsRepo) { ... Manufacturers = ToSelectList<Man...
Bitterweed asked 24/2, 2019 at 6:27

5

Solved

When I reformat code with Eclipse, it turns method headers like this: public void myMethod(String param) { into method headers like this: public void myMethod( String param) { When I was bro...
Humph asked 21/10, 2009 at 15:54

0

I'm in a situation where I have code that looks like this : #ifdef NOISE #ifdef NOISE_2D DECLARE_NOISE2D(); #else // NOISE_3D DECLARE_NOISE3D(); #endif #else DECLARE_NO_NOISE(); #endif Is there a ...
Fly asked 27/10, 2020 at 16:2

9

Solved

I know that #defines, etc. are normally never indented. Why? I'm working in some code at the moment which has a horrible mixture of #defines, #ifdefs, #elses, #endifs, etc. All these often mixed in...
Starbuck asked 25/4, 2009 at 14:56

2

I have installed google-java-format plugin for IntelliJ and I have enabled the plugin. When I format the code, my java code gets indented by 2 spaces. How do i change the google java formatter plug...
Morisco asked 15/5, 2018 at 19:12

2

Solved

I want to use clang-format to align my comments, but nothing else. The option for that is: AlignTrailingComments (bool). But when I run the following: clang-format-3.6 -i -style='{AlignTraili...
Madoc asked 10/6, 2015 at 17:58

12

Is it possible to auto-format your code in Dreamweaver like in Visual Studio (ctrl+k+d)
Ursola asked 27/1, 2010 at 12:44

6

Solved

I would like to format my HTML with a command, as I do in Visual Studio, using Ctrl+K+D. Is this possible in Atom? If not, are there other options?
Polybius asked 12/6, 2014 at 16:8

4

Solved

I don't use the Eclipse maven plugin while developing in Eclipse. I generate my Eclipse classpath externally using the following command: mvn eclipse:eclipse This has worked fine for quite some...
Murphey asked 21/5, 2010 at 21:33

5

Solved

When there are many preprocessor statements and many #ifdef cascades, it's hard to get an overview since normally they are not indented. e.g. #ifdef __WIN32__ #include <pansen_win32> #else #...
Doubleheader asked 4/6, 2010 at 15:2

1

Solved

Is there any workaround to create sub-cells in Spyder? E.g. I know that with #%% Cell 1 I can create a new cell. But is there a way to create a sub-cell which is grouped under the cell as in # Cel...
Marcellemarcellina asked 15/7, 2020 at 8:26

4

Solved

I'm looking for a light, free tool to format my Vbscript code. The only way I've found so far is to auto-format it in VisualStudio. Although, it's too much to launch VisualStudio for this p...
Paraesthesia asked 7/6, 2010 at 14:12

4

I want to create a page on the Facebook, where I want to post Code from different languages. Does Facebook provide any means of posting formatted code on the wall? Is there an API for doing ...
Frankfrankalmoign asked 19/9, 2013 at 18:21

1

Solved

I do have a JavaScript code snippet that iterates through an array of fields looking for specific properties and adding those to a dictionary. Also, see this site for another example. return this.g...
Northrup asked 24/6, 2020 at 15:14

6

Solved

How can I format code in Visual Studio Code in the last update on Windows. I tried Ctrl+ K, Ctrl + D doesn't work... I also tried Shift + Alt + F. It didn't work either. I tried the following so...
Oviparous asked 14/3, 2016 at 10:7

4

Solved

This might not be quite the question you're expecting! I don't want a regex that will match over line-breaks; instead, I want to write a long regex that, for readability, I'd like to split onto mul...
Magel asked 21/9, 2010 at 16:3

6

Solved

I'm currently using a basic text editor to write my grails code. Does anyone know of a program that will automatically format code with indentation similar to indent does for C? I'd rather us...
Xanthophyll asked 24/6, 2009 at 13:18

© 2022 - 2024 — McMap. All rights reserved.