Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Prevent vscode from inserting new lines in the middle of my code on format.
Post
Prevent vscode from inserting new lines in the middle of my code on format.
I am cleaning up java code in vscode to make it more readable. When I format my document there are instances when vscode inserts new line character when I don't want it. Here I show 2 examples of when it does that.
I write:
if(a == 1) b = true;
When I format document vscode inserts new line before "b" like so:
if(a == 1)
b = true;
When I have a function with a lot of parameters which makes it very long (more than 120 characters, maybe?) it inserts new line in between parameters. Say I write:
a = abc(this_, function, takes, very1, very2, very3, very5, many, parameters);
and vscode formats it like so:
a = abc(this_, function, takes, very1, very2, very3,
very5, many, parameters);
How can I stop vscode from insert all of these new lines that I didn't ask for?
1 comment thread