Break long lines of code into multiple lines?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ondesic

Is there a way to take a long line of code and split it to 2 lines so it is easier to read?

:bust_in_silhouette: Reply From: Socrates

Use two indentations on the second line and it reads it as one line

:bust_in_silhouette: Reply From: Zylann

In GDScript you can use \:

var text = "Hello " \
    + "World, " \
    + "I am Zylann"

I think this should be added to the GDScript documentation.

Diet Estus | 2018-04-13 20:01

You can add it if you’d like! Great thing about open source projects!

t8 | 2021-11-13 13:31