How-to · VS Code for Mac
How to turn on word wrap in VS Code on Mac: shortcut and settings, 2026
Press Option+Z (⌥Z) with your cursor in the code editor to turn on word wrap in VS Code on Mac. That shortcut only lasts for the current session, so set Editor: Word Wrap to on in Settings (⌘,) if you want it every time.
Quick answer
- Press ⌥Z (Option+Z) with the cursor in the editor. Long lines wrap at once.
- That shortcut applies to the current session only. Your saved setting takes over after a restart.
- For a permanent change, press ⌘, and set Editor: Word Wrap to on.
- If ⌥Z types a symbol, click into the code first, then try again.
What you need
- A Mac running macOS with VS Code installed
- A file open in the editor that has at least one long line
- Keyboard focus in the code editor, not in the sidebar
How to Turn on word wrap in VS Code on Mac in VS Code on a Mac
Open a file with long lines
Open VS Code and open a file that has long lines. A Markdown note, a log file, or a file with long comments works well. A file where every line is short will show no change, so pick one that wraps.
Click inside the code
Click anywhere in the text of the editor. You should see the blinking cursor in the code, not in the sidebar, the search box, or a dialog. Keyboard focus decides where the shortcut goes.
Tip: If you pressed ⌥Z and nothing changed, click into the code and try again.
Press Option+Z
⌥Z
Hold Option (⌥) and press Z. Long lines now break at the right edge of the editor, and the rest of each line appears on the next row. Press ⌥Z again to turn wrap off.
Tip: The toggle only lasts for this session. Restarting VS Code resets it.
Check that wrap is on
Look at a line that is longer than the window. If the text continues on a new row, wrap is on. If you still scroll sideways to read it, click into the code and press ⌥Z once more.
Make it permanent in Settings
⌘,
Press ⌘, to open Settings. Click the search box and type word wrap. Find Editor: Word Wrap, open the dropdown, and choose on. The setting stays after you quit VS Code.
Tip: Prefer text? Run Preferences: Open User Settings (JSON) from the Command Palette and add "editor.wordWrap": "on".
Use the Command Palette as a backup
⇧⌘P
Press ⇧⌘P to open the Command Palette. Type Toggle Word Wrap and press Return. Use this route when ⌥Z is taken by another app or types a symbol such as Ω.
Tip: Some guides call it View: Toggle Word Wrap. Searching for Word Wrap finds it either way.
Turn on word wrap with Option+Z
Option+Z is the fastest route. Microsoft's basic editing docs say you can toggle word wrap for the VS Code session with ⌥Z. On Windows and Linux the same toggle uses Alt+Z, so guides written for those systems show that key instead.
The shortcut acts on the editor. If focus sits in the Explorer, a search box, or a dialog, the keystroke goes there instead. Click into the code first. Then press the shortcut and watch the long lines break.
Press ⌥Z a second time to turn wrap off. Each press flips the state for the session. That makes it easy to compare the wrapped and unwrapped views in a few seconds.
What word wrap changes on screen
When wrap is on, a long line breaks at the right edge of the editor. The rest of the line appears on the next row. You scroll down instead of sideways, which makes prose, logs, and long comments easier to read.
The default is off. Setting editor.wordWrap to on wraps text at the editor's viewport width, which is the visible width of the editor pane. The official docs I checked describe the setting this way and say nothing more about the edge.
Wrap changes how text looks, not what the file contains. Your saved file keeps the same characters and the same line breaks. The toggle is a display change.
Use the toggle for a quick look. Use the setting when wrap should always be on. Pick the method by how long you want it to last.
Turn on word wrap from the Command Palette
The Command Palette is the fallback when a shortcut clashes with another app or types a character. It lists every command in VS Code, so you can run word wrap by name. Press ⇧⌘P to open it.
- Press ⇧⌘P to open the Command Palette.
- Type Toggle Word Wrap in the box.
- Press Return to run the highlighted command.
Some guides name the command View: Toggle Word Wrap. Either name finds the same command, so search for Word Wrap and pick the match from the list.
Forgot the name? The UI docs say you can type ? in the palette input to list commands. Use that to browse what VS Code offers, then run the one you need.

Make word wrap stay on for every file
The toggle only lasts for one session. If you want wrap on every time you open VS Code, change the editor.wordWrap setting. Its default value is off, so a fresh install starts with wrap disabled.
Open Settings with ⌘, or choose Code > Settings > Settings from the menu bar. The Settings editor opens in a tab. Click the search box at the top and type word wrap.
Find Editor: Word Wrap in the results. Open the dropdown and choose on. The change stays after you quit VS Code, so you do not repeat the step each morning.
You can also edit the JSON file. Open the Command Palette, run Preferences: Open User Settings (JSON), and add the line "editor.wordWrap": "on". Put a comma after the previous entry if one exists, then save the file.
75.9%
of all respondents in the 2025 Stack Overflow Developer Survey used Visual Studio Code.
Stack Overflow Developer Survey 2025: TechnologyWhere Word Wrap should appear in the View menu
Some third-party guides say View > Word Wrap. The official VS Code UI docs describe View > Appearance and View > Editor Layout. They do not name a Word Wrap item under View, so check the menu on your own build.
If you find the item, choose it. It runs the same toggle as ⌥Z for the current session. If it is missing, skip the menu and use ⌥Z or the Command Palette instead. Nothing is broken.
Menus move between releases. An old screenshot can point you to the wrong place, so trust the menu on your screen over any guide, this one included.
Word wrap in VS Code for the web at vscode.dev
The web version runs inside a browser, and the browser keeps some shortcuts for itself. The VS Code web docs say some shortcuts behave differently there. Ctrl+N and Ctrl+W belong to the browser in that setting.
The docs do not confirm whether ⌥Z works in vscode.dev. Test it in your browser. If it does nothing, open the Command Palette and run Toggle Word Wrap from there.
The palette shortcut can clash too. The docs say that in Firefox the palette opens with F1 instead of Ctrl+Shift+P. Try F1 if ⇧⌘P does nothing in your browser.
Fix Option+Z when it types Ω instead of wrapping
On a Mac, Option combined with a letter can type a symbol. One report describes ⌥Z typing Ω in a sidebar text field. I could not open that report to check the details, so treat it as a likely cause, not a confirmed one.
The fix is to move focus. Click into the code, then press ⌥Z again. If it still types Ω, reassign the command in Keyboard Shortcuts. Search for Toggle Word Wrap, select its keybinding, and press a new combination.
A new keybinding only changes your copy of VS Code. You can change it back from the same screen, so the change is easy to undo.

Choose the right method for your task
Pick the method by how long you want wrap to stay on. The table lists each route with its scope and the first thing to press.
| Method | Scope | Best for | Start with |
|---|---|---|---|
| Option+Z (⌥Z) | Current session | A quick look at a long line | Click in the editor, press ⌥Z |
| Command Palette | Current session | A shortcut that clashes or types Ω | ⇧⌘P, then Toggle Word Wrap |
| Editor: Word Wrap setting | Every file, after restart | Wrap on by default | ⌘, then search word wrap |
| settings.json | Every file, after restart | Editing settings as text | Preferences: Open User Settings (JSON) |
If you read only one part of this guide, use ⌥Z for a quick look and the Settings route for a default. Those two cover most cases.
Check your VS Code version before you start
The steps here match the official docs I checked. The latest Stable release in that research is VS Code 1.145, released on November 4, 2026. Updates 1.145.1 and 1.145.2 followed it.
The 1.145 release notes do not mention word wrap, keybindings, or the Settings and Keyboard Shortcuts editors. So the steps should work on that build without changes.
If your copy is older, update it before you troubleshoot. The macOS download comes as Universal, Intel, and Apple silicon builds. Pick the build that matches your Mac, or use Universal if you are not sure which one fits.
Read Mac keyboard symbols in VS Code shortcuts
VS Code shortcuts on a Mac use symbols. ⌘ is Command, ⌥ is Option, ⌃ is Control, and ⇧ is Shift. The keybindings docs show Mac shortcuts with these symbols when you read them on a Mac.
Read ⇧⌘P as Shift plus Command plus P. The order you press the modifiers does not change the result. Press Option and Z together to get ⌥Z.
Microsoft also publishes a printable Keyboard Shortcut Reference with a macOS version for US English keyboards. Print it if you move between a Mac and Windows often.
Mistakes people make with word wrap
- Pressing ⌥Z while the cursor sits in the sidebar, then deciding VS Code is broken.
- Expecting the toggle to survive a restart. It only applies to the current session.
- Changing the setting in one scope while another scope overrides it. Check the Workspace tab in Settings.
- Following an old guide that puts Word Wrap in a View menu position that has since moved.
Most of these come down to focus or scope. Check where the cursor is, then check which settings level you changed.
What to do after word wrap is on
Wrapped text helps most in Markdown notes, logs, and long comments. For code, you may prefer wrap off, so long lines stand out. Pick the setting that fits the file you are reading.
Once the view looks right, you might want a second pane. The guide on splitting the editor in VS Code on Mac covers those steps. To change the look of the editor, see changing the color theme in VS Code on Mac.
Keep this page open when you set up a new Mac. The shortcut and the Settings route take less than a minute, and you only need to do them once.
VS Code shortcuts for this on Mac
| To do this | Press |
|---|---|
| Toggle word wrap for this session | ⌥Z |
| Open the Command Palette | ⇧⌘P |
| Open Settings | ⌘, |
| List commands in the palette input | ? |
If it does not work
- Option+Z types Ω instead of wrapping
- Your focus is in a text field, not the editor. Click into the code, then press ⌥Z. If it still types Ω, reassign Toggle Word Wrap in Keyboard Shortcuts to another key combination.
- Wrap turns off after I restart VS Code
- The toggle only lasts for the session. Set Editor: Word Wrap to on in Settings with ⌘, to keep it on after a restart.
- The setting says on but lines still run off the edge
- Open Settings, search for word wrap, and check the Workspace tab. A workspace value can override the user value you changed, so set the value at the level you need.
- No Word Wrap item in the View menu
- Some third-party guides list View > Word Wrap, but the official UI docs do not name it. Use ⌥Z, or run Toggle Word Wrap from the Command Palette.
- Shortcuts do nothing in vscode.dev
- The docs do not confirm whether ⌥Z works in the browser. Run Toggle Word Wrap from the Command Palette. If ⇧⌘P does nothing, try F1.
Faster with Lazur
Do it faster: ask Lazur while you are in VS Code
Hold ⌥ ⌘ and say what you want. Lazur sees your VS Code window. Lazur draws a circle and a label around the button or menu you need.
- 1
Hold ⌥⌘ and talk
- 2
Lazur draws a circle and a label around the button or menu you need.
- 3
You stay in VS Code. Nothing to copy into a chat window.
Free for 3 days, then $18/month. Download for Mac
You say“Where is the word wrap setting in VS Code?”
Lazur · points at itLazur circles Editor: Word Wrap on screen and says what it does. You choose on or off yourself.
Questions people ask
Does Option+Z save word wrap after I restart VS Code?
No. The VS Code docs say the toggle applies to the current session only. For a setting that stays, press ⌘, and set Editor: Word Wrap to on, or add "editor.wordWrap": "on" to your user settings JSON.
What is the Windows shortcut for word wrap in VS Code?
On Windows and Linux the toggle is Alt+Z. On a Mac the same toggle is ⌥Z, where Option plays the role that Alt plays on a Windows keyboard.
Why does Option+Z type Ω instead of turning on word wrap?
On a Mac, Option with a letter can type a symbol. Ω is what one report describes in a sidebar text field. Click into the code editor so VS Code gets the shortcut, then press ⌥Z again.
Is there a Word Wrap item in the View menu?
Some third-party guides say View > Word Wrap. The official UI docs I checked name View > Appearance and View > Editor Layout, not Word Wrap. Check the menu on your build. If it is missing, use ⌥Z or the Command Palette.
Does word wrap work in VS Code for the web at vscode.dev?
The web docs do not confirm whether ⌥Z works in vscode.dev. Test it in your browser. If it does nothing, run Toggle Word Wrap from the Command Palette, and try F1 if ⇧⌘P does nothing.
Which version of VS Code should I use for these steps?
The latest Stable release in my research is VS Code 1.145, dated November 4, 2026, with updates 1.145.1 and 1.145.2. Its release notes do not mention word wrap, so the steps should match it.
Does word wrap change the text in my file?
No. Word wrap changes how long lines appear on screen. Your saved file keeps the same characters and line breaks, so you can toggle it without editing anything.
Should I keep word wrap on for code?
That depends on the file. Wrap suits prose, Markdown, and logs. For code you may prefer wrap off, so a long line stands out as it is.
Sources
- Basic editing: Visual Studio Code docs · Microsoft · checked 2026-11-09
- User Interface: Visual Studio Code docs · Microsoft · checked 2026-11-09
- Settings: Visual Studio Code docs · Microsoft · checked 2026-11-09
- Key Bindings for Visual Studio Code · Microsoft · checked 2026-11-09
- VS Code for the Web: Visual Studio Code docs · Microsoft · checked 2026-11-09
- Visual Studio Code 1.145 · Microsoft · checked 2026-11-09
- Stack Overflow Developer Survey 2025: Technology · Stack Overflow · checked 2026-11-09
Try Lazur free for 3 days
Hold a key and ask. Lazur sees your screen, points at the button and talks you through it, in any Mac app. No credit card.