Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sfm-cz/beautyAmp

Format/Beautify/Prettify your AMPscript with this VS Code Extension.
https://github.com/sfm-cz/beautyAmp

Last synced: about 2 months ago
JSON representation

Format/Beautify/Prettify your AMPscript with this VS Code Extension.

Awesome Lists containing this project

README

        

# AMPScript Beautifier

Format (Beautify/Prettify) your SFMC AMPscript with this extension.

Originaly developed with Merkle DACH (former Isobar Switzerland) and now available to the developer community.

## Features

* Automatic formatting (indentation, methods, etc.).
* Setting of Case-sensitivity of the keywords.

## Usage

1. Mark your file as AMPscript (save as `.amp` or using the `Language Mode` selector)
2. Run `Format Document` command.

![Beautifier](https://raw.githubusercontent.com/fib-at-isobar/beautyAmp/master/images/beautyAmp.gif)

The format command can also run automatically if your settings allow for it (settings: `editor.formatOnSave`).

## Extension Settings

This extension contributes the following settings:

* `beautyAmp.maxParametersPerLine`: How many method parameters can be located on one line?

* `beautyAmp.capitalizeVar`: Use upper case characters for 'VAR' keywords (false for lowercase).
* `beautyAmp.capitalizeSet`: Use upper case characters for 'SET' keywords (false for lowercase).
* `beautyAmp.capitalizeAndOrNot`: Use upper case characters for 'AND', 'OR', 'NOT' keywords (false for lowercase).
* `beautyAmp.capitalizeIfFor`: Use upper case characters for 'IF' and 'FOR' blocks keywords (false for lowercase).

Default values can be found in Features Contributions.

## Known Issues

* Statements and For iterations are not fully formatted,
* NOT is not formatted
* Function and Variable names are not handled.
* HTML beautifier is currently not included.