Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidosomething/syntastic-hbstidy
Vim plugin to clean up Handlebars templates BEFORE running Tidy via Syntastic
https://github.com/davidosomething/syntastic-hbstidy
Last synced: 3 months ago
JSON representation
Vim plugin to clean up Handlebars templates BEFORE running Tidy via Syntastic
- Host: GitHub
- URL: https://github.com/davidosomething/syntastic-hbstidy
- Owner: davidosomething
- Created: 2016-01-15T22:38:20.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-15T22:38:44.000Z (almost 9 years ago)
- Last Synced: 2024-06-21T09:27:06.983Z (5 months ago)
- Language: VimL
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# syntastic-hbstidy
[![Upstream][upstreamBadge]][upstreamLink]
[Syntastic] checker for tidy, specifically for Handlebars templates.
## Description
This plugin basically strips out the handlebars contents before passing the
contents to tidy. It is based (and 90% of the code) is the same as the HTML
tidy [Syntastic] checker.There are also a few new HTML attributes and elements allowed (Microdata
itemprops, angular ng-attrs, and Facebook `` elements).## Installation
This plugin requires [Syntastic] installed.
It also requires the `tidy` binary (install `tidy-html5` via homebrew, or any
`tidy` via your OS package manager).Install the plugin as usual, e.g. using vim-plug:
```viml
Plug 'davidosomething/syntastic-hbstidy'
```Then, enable it for your handlebars filetype in your vimrc:
```viml
" Map some filetypes, e.g. turn off html checkers on handlebars (I'm using my
" hbstidy instead of html tidy)
let g:syntastic_filetype_map = {
\ 'html.handlebars': 'handlebars',
\ }" Use these checkers (handlebars is a different checker, not required for the
" hbstidy plugin)
let g:syntastic_handlebars_checkers = ['handlebars', 'hbstidy']
```## Configuration
All the same options as the HTML tidy syntax checker apply, just replace
`html_tidy` with `handlebars_hbstidy` for all settings variables.
Refer to the [syntastic wiki entry for tidy].[upstreamBadge]: https://img.shields.io/badge/upstream-GitHub-lightgrey.svg
[upstreamLink]: https://github.com/davidosomething/syntastic-hbstidy
[Syntastic]: https://github.com/scrooloose/syntastic
[syntastic wiki entry for tidy]: https://github.com/scrooloose/syntastic/wiki/HTML%3A---tidy