From ef9c0c8fb2f99985d22bd5acec3d60a806a1c35c Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Sat, 6 May 2017 17:26:34 -0300 Subject: [PATCH] See #27. Update README with instructions to beautify a specific language --- README-template.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README-template.md b/README-template.md index 55f9712..9366c29 100644 --- a/README-template.md +++ b/README-template.md @@ -24,6 +24,8 @@ - [Beautifiers](#beautifiers) - [Language Support](#language-support) - [Usage](#usage) + - [Command Palette](#command-palette) + - [Beautify a Specific Language](#beautify-a-specific-language) - [Selection of Code](#selection-of-code) - [Beautify On Save](#beautify-on-save) - [Keyboard Shortcut](#keyboard-shortcut) @@ -75,10 +77,20 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti ## Usage +### Command Palette + Open the [Command Palette](https://github.com/atom/command-palette), type `Beautify`, and run `Beautify Editor`. ![image](https://cloud.githubusercontent.com/assets/1885333/16542583/1c8d975c-4085-11e6-8307-e35df7430a10.png) +#### Beautify a Specific Language + +You can use the [Command Palette](https://github.com/atom/command-palette) to beautify the editor for a specific language. +The commands are in the form `Atom Beautify: Beautify Language {NAME}` (i.e. `atom-beautify:beautify-language-{NAME}` for keyboard shortcuts). +For example, you may want to beautify `JavaScript` code within a `HTML` file. + +![atom-beautify-language-commands](https://cloud.githubusercontent.com/assets/1885333/25775586/f3fc7ec4-327e-11e7-8576-45e735e80032.gif) + ### Selection of Code It will only beautify selected text if a selection is found -- if not, the whole file will be beautified. @@ -96,7 +108,6 @@ For example, for language `HTML` go into Atom-Beautify's package settings (`Atom ![atom-beautify-setup-beautify-on-save](https://cloud.githubusercontent.com/assets/1885333/16542692/3e781e74-4089-11e6-9cf2-5a19af161093.gif) - ### Keyboard Shortcut You can also type Ctrl-Alt-B as a shortcut or click `Packages > Beautify` in the menu.