Vscode: Enable word wrap on MDX files.

April 30, 2024

The Goal

Improve readability and editing your mdx files by enabling word wrap on MDX files in Vscode.

The Solution

  1. Inside Vscode.
  2. Press CMD + Shift + P to open the command palette. (Ctrl + Shift + P if you're on Windows.)
  3. Search for Preferences: Open Settings (JSON) and press Enter.

Add the following configuration to your settings.json file:

{
    "[mdx]": {
        "editor.wordWrap": "wordWrapColumn",
        "editor.quickSuggestions": false,
        "editor.wordWrapColumn": 80,
    }
}