Skip to content

Commit cc59036

Browse files
authored
Merge pull request #1 from awslabs/vimrc
Add .vimrc instructions
2 parents 7320050 + bb080fc commit cc59036

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ This project is licensed under the Apache 2.0 License.
1212

1313
To use `cfn-format`, you can clone this repository and run `go build` or download the [latest release](https://github.com/awslabs/aws-cloudformation-template-formatter/releases/latest) for your operating system.
1414

15+
If you're using [vim](https://www.vim.org/), you can add the following to your `.vimrc` to automate running `cfn-format` when you save a `.template` file:
16+
17+
```vim
18+
autocmd BufWritePost *.template silent !cfn-format -w % 2>/dev/null
19+
```
20+
1521
### Command-line tool
1622

1723
```console

0 commit comments

Comments
 (0)