Word Wrap

Hello! this is off topic, i really need ur help guys. I just want my codes looking good on vs code and here's the problem: Every time I insert a paragraphs of text and save it with word wrap on the content of my paragraphs going like this (first photo). And when i turn off the word wrap it goes like this (second photo). I want my paragraphs to be like justify like the second photo with word wrap is on. How am i going to fix it? Thanks!
first
second
7 Replies
Jochem
Jochem13mo ago
the only way would be to not use any newlines in your block of text. Just let the word wrap move the text visually and nothing else. It won't be perfectly justified, but it will adjust to your editor size
0012039810328
001203981032813mo ago
when i am inserting a text on a paragraph everything is fine but when it's time to save it boom! it used new lines, i think its the new update? if it will not cause any problem then i will ignore it but if it does please help .
Jochem
Jochem13mo ago
it shouldn't cause any problems, HTML strips all whitespace including newlines down to a single space between characters, so hello world and
hello




world
hello




world
are rendered the same. it sounds like maybe prettier is turned on, that might be causing the newlines to be inserted
0012039810328
001203981032813mo ago
yep! aight! thanks bro!
Jochem
Jochem13mo ago
this is the option you should look at, probably https://prettier.io/docs/en/options.html#print-width
Options · Prettier
Prettier ships with a handful of format options.
Jochem
Jochem13mo ago
you can have a .prettierrc file in your project's root, vscode should respect that (might need a restart / reload after changing options)
0012039810328
001203981032813mo ago
ok bro, thanks!
Want results from more Discord servers?
Add your server