code-formatting Questions
3
My problem is when I create a new method it looks like this...
public string firstName {
}
The cursor is stays right before the }, and then if I type more code it looks like...
public string fi...
Greyso asked 23/4, 2016 at 23:12
8
Solved
I would like to autoformat / beautify my SQL-queries directly in pgAdmin4. I know this feature from Java-developing in Eclipse, where I can beautify the whole code using a simple shortcut.
I only...
Protocol asked 3/6, 2017 at 15:0
10
Solved
I'm using Laravel so all the views are .blade.php files. Visual Studio Code won't format the HTML because of the PHP extension. I removed the "blade" part of the filename, but it still isn't format...
Fane asked 26/12, 2016 at 11:40
7
Solved
I know that Black is an opinionated formatter, but I love everything it does except one major thing. When I have a function with multiple arguments, instead of displaying it like this:
def example_...
Avantgarde asked 4/12, 2019 at 20:1
6
Solved
I have a lot of SQL at work in MS-Access, and I need to formatted so that it's human readable. The issue is when I change between views I end up with the SQL being condensed down into something tha...
Bywaters asked 13/8, 2012 at 7:49
13
Solved
I am experiencing an intermittent problem with ESLint in VS Code. When saving a file, instead of formatting it, this message shows in the status bar:
Apparently no one has ever reported this messa...
Pallua asked 28/10, 2021 at 4:23
3
Solved
I noticed Intellij Idea auto formatting removes spaces from blank lines. In an example below spaces are shown with "_"
__line1
__
__line3
And idea makes that:
__line1
__line3
How can I turn ...
Push asked 1/7, 2014 at 13:28
2
I have reinstalled the last version of IntelliJ IDEA and then when I try to format an SQL file, it orders all the lines as shown on the image.
However, I have not made any settings for SQL formatt...
Gradualism asked 22/4, 2022 at 18:2
18
I prefer my own style of code formatting as opposed to Visual Studio's default settings. I've turned off auto-formatting options in Tools→Options. In most cases, it works.
However, after using any ...
Mathia asked 10/4, 2009 at 10:14
9
Solved
In Python, I want to write a multi-line dict in my code. There are a couple of ways one could format it. Here are a few that I could think of:
mydict = { "key1": 1,
"key2": 2,
"key3": 3, }
myd...
Bespangle asked 17/6, 2011 at 15:35
6
Solved
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?
Effeminize asked 30/7, 2010 at 20:56
7
Solved
Using Husky, I've set up my package.json with a precommit hook so that my JavaScript code is formatted using Prettier before every commit:
{
"name": "prettier-demo",
"scripts": {
"precommit": "...
Hollishollister asked 2/12, 2017 at 16:51
4
Solved
I would like to ignore a specific multi-line code by black python formatter. Particularly, this is used for np.array or matrix construction which turned ugly when formatted. Below is the example.
...
Semiotics asked 27/10, 2019 at 23:59
1
I want to enforce one-line if statements not having braces. For example:
// incorrect
if(foo) {
bar()
}
// correct
if(foo) bar()
But if I have else/else ifs, I still want to keep braces:
// inco...
Jaw asked 3/10, 2022 at 3:26
48
Solved
Does anyone know a way to display code in Microsoft Word documents that preserves coloring and formatting? Preferably, the method would also be unobtrusive and easy to update.
I have tried to incl...
Annates asked 22/12, 2008 at 21:45
4
Solved
How can I reformat code in MATLAB editor?
Other IDEs usually have reformat or format option that arrange position of written codes.
Does editor of MATLAB have it?
I use MATLAB R2013a
Lighthouse asked 30/5, 2014 at 18:5
6
Solved
I witnessed this in the GOTO 2016 • Kotlin - Ready for Production conference by Hadi Hariri.
In some of his code, what would normally look like:
if (x != y) { /* do some stuff */ }
Renders as:
if ...
Irradiant asked 20/1, 2017 at 23:33
11
Let's say I type in the following code and format it.
if (condition) { /* Hello! */ }
If this is C# code, it is formatted like this:
if (condition)
{
// Hello!
}
If it is JavaScript, VSCode ...
Colpin asked 2/10, 2015 at 5:14
1
Here is my code:
if constexpr (requires { { N::uuid() } -> std::convertible_to<score::uuid_t>; })
clang-format (14, 15) insists in formatting it in 5 lines:
if constexpr (requires {
{
N...
Lianaliane asked 29/6, 2022 at 9:6
5
Solved
Are there objective reasons for using spaces instead of tabs for indenting files as per PSR-2 standard, can someone provide:
facts,
references,
specific expertise
on which PSR-2 standard is based...
Palaeozoic asked 26/2, 2016 at 10:55
4
Solved
I'd like to enforce curly braces for switch-cases in JS, possibly with ESLint or Prettier. Do you know of any related config, or if not that, then any other linting or formatting tool?
I tried the ...
Bimetallic asked 21/8, 2021 at 12:0
4
Solved
I have a list in Python which includes up to 50 elements.
In order for me to easily add/subtract elements, I'd prefer to either code it vertically (each list element on one Python code line) or alt...
Luciusluck asked 26/4, 2020 at 20:46
2
Solved
Whenever I run the IntelliJ autoformatter - it converts this:
@Autowired private CustomerDao customerDao;
into this:
@Autowired
private CustomerDao customerDao;
How can I stop it from doing ...
Farra asked 23/12, 2009 at 4:24
8
Solved
I'm not able to format my code in IntelliJ.
I can see the margin line (by default at 120 columns) but it seems that the activation from the menu:
Code -> Reformat Code
is just ignoring this ...
Passed asked 1/10, 2010 at 9:31
6
According to my understanding, when two developers work on the same project, but use different coding styles, there is no built-in way in GIT to uniformize commited sources. Please, correct me if I...
Expropriate asked 5/10, 2016 at 12:32
1 Next >
© 2022 - 2024 — McMap. All rights reserved.