Wrap lines in text-editors?

I am missing a switch to let longer lines of code wrap to the next line instead of having to scroll to the right.

This applies to all editors that are used to modify source code e.g. “HTML”-source, JavaScript-Expressions etc.

1 Like

Not a good idea if you ask me… For HTML, I agree that this can be somewhat useful but for actual programming code it would go against most known best practices since it could create major confusion. Usually, I tell my coders that when a single line of code is so long that you would like it to wrap around in the editor, it means it should be broken down into smaller elements or re-designed. This makes maintaining code much easier than trying to understand code that may or may not spread over several lines.

I agree with you that one should write code that is easy to read and thus better to understand and no one should be forced to read wrapped lines of code. But as sometimes you’ll have to read HTML-code that has been inserted and formatted automatically from the Designer, I’d like to see all of the code at once - without scrolling or reformatting. I am not sure, if and when the code might be reformatted by the Designer.

For a current template, I inserted a barcode 128 - the generated line was 4 times longer that the visible part.

If someone doesn’t like wrapped lines - so what: don’t use that feature.

I also would like to turn on line numbers - helpful when talking with customers about their templates over the phone.

As I said: I agree that for HTML code it could be useful. It’s the JS part that I disagree with.