/scarpet-formatter

Format ,prettify and beautify Scarpet code by using shortcuts, context menu or CLI

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

Scarpet Formatter

This extension wraps js-beautify to format your Scarpet Script.

This project is modifying based on Lonefy/vscode-JS-CSS-HTML-formatter under MIT license, new code of this project will under gpl-v3 license

How To Use

  • open Context Menu and choose Format Code
  • shortcuts: Alt+Shift+F
  • CLI: Press F1, enter Format Code

the upper 3 ways don't work for Javascript&JSON after vscode v0.10.10, but you can still format CSS and HTML.

To format Javascript,CSS and HTML after vscode v0.10.10

  • CLI: Press F1,enter Formatter

Config

  1. Press F1, enter Formatter Config, open the config file:

    image

  2. Edit the file as your needs. This extension uses js-beautify internally, so you can edit the parameters which js-beautify can use.

    image

  3. Restart vscode [!Important]

THANKS:

rjmacarthy, zhaopengme, Arrow7000, bitwiseman, Lonefy