How to display long continued lines in IDE?

Hello,

I have long code lines which are currently being displayed within the width of the IDE. How can I make the lines go beyond the width of the IDE? P.S. : This is different than word wrap, which is already off.

I had the desired behavior by default and I managed to change it somehow but not able to revert back.

On a windows machine, + z will toggle line wrap.

"alt-z" toggles between word wrap settings, which is already off for me. If you notice in the image that I attached, the IDE is continuing with the same line number.

My bad.

How do you tell? I don't see a direct indicator for the current state. Seems like there are four states (with hotkey or the Command Palette)

  • off
  • wrap at window width
  • wrap at fixed width -- 80 columns?
  • wrap at window width, or 80 columns, whichever is less

Then back to off.

In addition there may be a situation where a line with 10,000 characters is always wrapped. How long is that line?

For various reasons, you may be better off adding hard line breaks. Or you can put the giant array in a separate .h file and then #include it so there isn't so much to scroll through.

1 Like

The IDE is continuing with the same line so I concluded that the word wrap is off. I tried cycling through all options but it did not result in desired view. However, at this point I created a new sketch and it seems to be displaying as expected.

So I am not sure weather it is just for a particular sketch.

Thank you for suggesting the header file route, I think I am going to follow that.

maybe scroll to the left? or get another monitor? just some ideas. Have a good day! oh this was solved. cool!

That is what word wrap does. A single line of content is displayed as multiple lines. But that is still one line of content, so it has a single line number.

Yes, it is 80 by default. However, you can change this via the "Editor: Word Wrap Column" option in Arduino IDE's advanced settings

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.