Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>SVGOCDNew to Visual Studio Code? Get it now.

SVGOCD

Stian Haga

|
1,145 installs
| (2) | Free
SVGO extension for VS Code, fully configurable.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
logo

Build Status code style: prettier downloads Greenkeeper badge

Features

Supports running SVGO on the current open SVG file in VS Code or currently selected SVG. Simply open the command palette and type SVGOCD and you should find the command SVGOCD: Optimize current SVG.

Also supports editing plugin settings from both extension settings or through having a .svgo.yaml file in the root folder.

Workflow

Settings

Settings can either be configured from the extension settings or having a .svgo.yml file in the root directory. A .svgo.yml file will override the extension settings.

Config file

plugins:
  - removeDoctype
  - removeXMLProcInst
  - removeComments
  - removeMetadata
  - removeXMLNS
  - removeEditorsNSData
  - cleanupAttrs: false  
  - removeTitle: true

js2svg:
  pretty: true
  indent: 2

Extension settings

Supports all SVGO plguin settings through extension settings (svgocd.plugins.*). Boolean values to enable/disable or object values for plugin settings can be used. Full list of plugins from https://github.com/svg/svgo :

View all plugin settings | Plugin | Description | | ------ | ----------- | | [cleanupAttrs](https://github.com/svg/svgo/blob/master/plugins/cleanupAttrs.js) | cleanup attributes from newlines, trailing, and repeating spaces | | [inlineStyles](https://github.com/svg/svgo/blob/master/plugins/inlineStyles.js) | move and merge styles from `
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2019 Microsoft