3 ways to open SVG files as text instead of preview mode in Visual Studio Code.
Method 1: Set editor via context menu
- Locate any
.svg
file - Right-click it and select Open With...
- Select Configure default editor for '*.svg'...
- Set **Text Editor" as the default
Method 2: Set editor via settings.json
- Open Manage menu from the gear icon (βοΈ)
- Go to Settings
- Open
settings.json
from the file icon (π) - Add the following snippet:
"workbench.editorAssociations": {
"*.svg": "default"
}
Method 3: Set editor via GUI
- Open Manage from the gear icon (βοΈ)
- Go to Settings
- Search for
Workbench.EditorAssociation
- Click Add Item
- Enter
*.svg
in the Item field - Enter
default
in the Value field - Click OK to apply
Contact
- YouTube: Vrauuss Softwares
- GitHub: Vrauuss Softwares
Blog
Coming soonβ¦
Article
- YouTube: How to Disable SVG Preview Mode
- DEV.to: How to Disable SVG Preview Mode
References
- Reddit: SVG files open as Preview
- StackOverflow: Unable to import SVG with Vite as React Component
Top comments (0)