This document contains very long lines message

Hello

I am facing the problem in all editors if file contains "long lines", starting from 14.1 version of Idea. The message which is shown said that the lines are long and that IDEA will wrap them in new line. But, the problem is that I have lots of long lines in all files, and also if screen resolution is small, these files become very long and hard to understand and manage. Imagin the JS file which has all its code in one line which is then split in hundreds of lines.

Is there any configuration parameter in settings to avoid these splittings in multi-lines?

long_lines.PNG

Nikola

4 comments
Comment actions Permalink

Thank you very much, vote completed :)

0
Comment actions Permalink

Hello Nicola,

Could you please explain what specific inconveniences does line auto-wrapping bring to you? Are there any tasks on minified Javascript files that you can more easily perform if they would be displayed on one line?

Regards,
Dmitry

0
Comment actions Permalink

Hello Dmitry

there is no any particular reason that would be easier to something with minified JS files. I just gave an example what happens when it is wrapper. In the project I am working on, we have one JS file with 20-30 minified JS libraries, but also we manage some custom JS function within the that file. When all minified JS files are wrapped, custom code we write is hard to find because file goes to several thousands of lines.

Also, in lots of test we have REST, and we test Json response, which we have hardcoded in the test. It is ususlly very long response, and it is good to stay in one line, not to be wrapper.

Anyway, I know that we can refactor everything, and leave minified JS lines in one file, do our custom in other file. Also for Json, we can read them from some files, but all that invole refactoring because of IDE and we would like to avoid it.

I saw in the issue tracker  that there is a editor.soft.wrap.force.limit config that should be put in .properties file. I did it and it solved my issues

Thanks
Nikola

0

Please sign in to leave a comment.