microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.39k stars 28.62k forks source link

Add option to opt out of word wrapping files with long lines #215407

Closed Tetrax-10 closed 2 weeks ago

Tetrax-10 commented 3 months ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Just open any JavaScript file

Screenshot:

image image

alexdima commented 3 months ago

@Tetrax-10 Is most of the content in your file sitting on very long lines? We have heuristics in place to detect minified JS code and turn on wrapping for such code. The reason is that we don't have horizontal rendering virtualization, only vertical. In that case we show a button in the editor title area to forcefully turn that off.

Tetrax-10 commented 3 months ago

@alexdima Yeah most of my contents are very long single line code eg: SVG in strings, data:image/png;base64, data:image/gif;base64. But none of my code are minified. JS file source code

Is this the button you are talking about? Screenshot (57)

Even if I click that button, the words are wrapped once i restart vscode. It doesn't remember it. Is there any way to tell vscode to ignore that file for word wrapping? Thank you.

alexdima commented 3 months ago

@Tetrax-10 I haven't tested it, but you could try "editor.wordWrapOverride": "off" in your settings (this is an internal setting).

Tetrax-10 commented 3 months ago

Didn't work its grayed out, but thanks for the help. You can close this issue if its not an issue.

image

alexdima commented 3 months ago

Yes, sorry about that, I didn't test it myself.

This whole thing is a workaround to avoid UI freezes with rendering very long lines. I will mark as FR for now, we can change the behavior or add a special setting editor.wordWrap: never if other folks thing it would help a lot.

VSCodeTriageBot commented 3 months ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

gjsjohnmurray commented 3 months ago

Is the "(also modified elsewhere)" in the screenshot relevant to your issue?

Tetrax-10 commented 3 months ago

This whole thing is a workaround to avoid UI freezes with rendering very long lines. I will mark as FR for now, we can change the behavior or add a special setting editor.wordWrap: never if other folks thing it would help a lot.

Sure, that will do it.

Tetrax-10 commented 3 months ago

Is the "(also modified elsewhere)" in the screenshot relevant to your issue?

I don't think so.

vs-code-engineering[bot] commented 3 weeks ago

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vs-code-engineering[bot] commented 2 weeks ago

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!