Stunning Framer templates—fully customizable, built to impress, ready for you or your clients • Ad
VS Code doesn’t have word wrap enabled by default. So, if you have long lines of code, a horizontal scrolling bar will appear.
If you handle design and write HTML, then long lines will definitely happen. So, it becomes frustrating to scroll horizontally all the time.
Luckily, there’s a simple solution for this, and I’ll share it with you fine people.
Disable Horizontal Scrolling in VS Code by Enabling Word Wrap
I’ll show you how to do it per file or for all files.
Set Word Wrap Globally
If you want to apply word wrap to all your files in Visual Studio Code, here’s what you need to do.
Go to File > Preferences > Settings and type in “word wrap” in the Search settings field.
Then, where it says Editor: Word Wrap, select on from the drop-down menu.
That’s it!
Toggle Word Wrap Per File
If you want to quickly toggle word wrap on and off per file in VS Code, then you can simply press ALT+Z on your keyboard, or go to View > Toggle Word Wrap.
As simple as that! 😃
That’s a Wrap
I hope this post has helped you out.
If you're interested in my web design services or templates, want to collaborate, or just have something to say, feel free to shoot me a message.