All Questions
Tagged with code-formatting ide
34
questions
0
votes
0
answers
397
views
PHP - PhpStorm - Code style reformat, keep if-statement in one line
I have a question about the code style of PhpStorm IDE. I am a fan of using braces for one line if statements but I can't get the settings right. When reformatting the code, everything between and ...
1
vote
1
answer
187
views
Clang format for banner style
An open-source project I contribute to uses banner style (also called Ratliff style). It looks like that:
// In C
for (i = 0; i < 10; i++) {
if (i % 2 == 0) {
doSomething(i);
...
0
votes
0
answers
31
views
Curly braces decrease scale on new line [duplicate]
In visual studio when using curly braces after loops or if or any other time they become very little in scale and I don't like it. This is happening after installing resharper but I have already ...
15
votes
4
answers
12k
views
Visual Studio Code> Python > Black formatting does not run on save
Although I seem to have configured both linitng and formatting properly, the linting runs but the black formatting does not.
"python.linting.flake8Enabled": true,
"python.linting.flake8Args":...
0
votes
1
answer
83
views
How PhpStorm setting to use COMPACTED Allman same line after open braces style
I want the PHP format to stop putting a newline after the open left brace for classes,functions,if,do,while,for,foreach.
class Foo
{ var $numbers = array("one", "two", "three", "four", "five", "...
0
votes
1
answer
986
views
Eclipse java class insert new line after method annotation
When using eclipse to create a class and set a master class (extends X) or an interface (implements Y) it formats automatically when creating the class like this:
public class class1 extends X {
...
1
vote
1
answer
724
views
Is there a cross-IDE solution to hint at formatting (like indentation)?
Is there a common mechanism to hint at IDE formatting like indentation (xxx spaces or tabs), and if yes, how well is it supported ?
I have seen something like that a while ago but I am unable to find ...
0
votes
2
answers
349
views
How can I automatically format C# line indentations like VB.NET
When I write something in VB.NET, the IDE automatically formats my line indents perfectly, I don't have to use the tab key at anytime.
In C#, when I needed to edit a line of code, and I perhaps ...
0
votes
1
answer
786
views
IntelliJ - how to prevent from adding an empty space when pasting entire lines?
Having a multicursor turned on:
When I use copy/cut (latter, in this example) shortcut, without any lines selected (just with the blinking cursor), I copy/cut the entire lines. After hitting Ctrl+X ...
124
votes
6
answers
46k
views
Enabling/Disabling IntelliJ's fancy ≠ (not equal to) operator
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 (x ≠...
2
votes
1
answer
3k
views
Intellij code format defaults for checkstyle
I enjoy clean, consistent code. I think teams should enforce this on their code bases.
However, I want to spend 0 time fudging around with alphabetizing my imports, messing with tab/space characters, ...
1
vote
1
answer
700
views
Microsoft Expression Web 4, blank space between lines of code
Every time I open my website to edit, there are more blank lines between my code. I delete the blank spaces (which takes forever) and close MEW4 and when I re-open it the next day, there are more ...
0
votes
2
answers
75
views
Writing code without curly braces
I think curly braces are entirely redundant. Indentation alone should be enough to define codeblocks. Is there a way to set up Visual Studio or a different IDE so that indentation simply implies a ...
1
vote
1
answer
97
views
Format C++ code with corresponding elements over multiple lines
I'm looking for a tool that makes out of the ugly block
if ( str == "str" ) decorator["str"] = &Props::goodstr;
else if ( str == "strM" )
decorator["strM"] = &Props::goodstrM;
...
0
votes
2
answers
508
views
IntelliJ Idea: Align on Colon for Scala Case Class Members?
Is there a way to prevent Idea from reformatting multiline case class members?
Intended result
(position of the colon is not so important, but the alignment of the type annotations would be great)
...