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!
7 Replies
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
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 .
it shouldn't cause any problems, HTML strips all whitespace including newlines down to a single space between characters, so
hello world
and
are rendered the same.
it sounds like maybe prettier is turned on, that might be causing the newlines to be insertedyep!
aight! thanks bro!
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.
you can have a
.prettierrc
file in your project's root, vscode should respect that (might need a restart / reload after changing options)ok bro, thanks!