If you implement JSP or HTML in Eclipse and format it, it will be a shame. Specifically, if you can write the format in such source code, it will be as follows.
[Before formatting]
[After formatting]
For the source, I borrowed the sample of Spring Boot that I am using now and modified it a little. https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples
What's unfortunate about this format is that it doesn't take into account two things:
Therefore, if you make the following settings in Eclipse, the required format will be created.
"Line width:" is the setting for the number of characters to be displayed on one line. 200 characters is just a guide, so if you want to display a longer sentence on one line, adjust it appropriately.
HTML tags to be displayed in inlie are registered in "Inline Elements:". Therefore, tags deleted from this setting will be displayed with line breaks.
Now it feels good to format it again.
Recommended Posts