0

I've got a lot of code that is segmented into separate lines in netbeans. I believe it's auto formatting it and when I change any formatting in the editor options it seems to not like it.

An example would be I have the following:

private String letters[] = new String[]{"A",
       "B"};

And I want it all to be the following:

private String letters[] = new String[]{"A", "B"};

I've tried online beautifiers and everything seems to leave it seperated. Any ideas / quick fixes ?

Thanks!!

EDIT: Still having issues with this. It's easy to do the reverse and seperate the lines when "Too long" but it doesn't seem like netbeans has a built in way of doing this. I may have to explore other options.

8
  • Can you add the lines that were made into multi lines? Commented Mar 4, 2019 at 1:10
  • @Mark - How do you mean? Sorry I'm not following. Commented Mar 4, 2019 at 1:11
  • Are you trying to disable NetBeans line wrapping but retain other auto formatting features? Commented Mar 4, 2019 at 1:16
  • @Mark - So it's disabled based on the below comment; but I'd like to clean up the current code that HAS the above issue (Where it's split into two lines). Commented Mar 4, 2019 at 1:17
  • try to change the Right Margin value of NetBeans. -> ozonesolutions.com/programming/wp-content/uploads/2012/01/… Commented Mar 4, 2019 at 3:55

1 Answer 1

0

As i understood from your description

 CTRL + SHIFT + F

with keyboard combination should be ok

Sign up to request clarification or add additional context in comments.

1 Comment

Hey, I think you're shooting for ALT + SHIFT + F -- And it uses the built in format which seems to be set to pull these apart rather than combine. Thanks for the try!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.