Highlight string as SQL, HTML, CSS or JavaScript in most languages.
在代码中,高亮 SQL、HTML、CSS 或者 JavaScript 代码。
- Visual Studio Code v1.6.0 and above is recommended, but I'm not sure.
- Highlighting
- Commenting
- Bracket matching
- Closing pairs
- Snippets
Language | Sign pair | Snippets | Comment |
---|---|---|---|
SQL | --sql , ; |
- | |
SQL | --beginsql , --endsql |
hsql , highlight-sql |
|
SQL | --begin-sql , --end-sql |
- | |
SQL | UPPERCASE KEYWORD, ; |
- | |
Hive SQL | --hive , --!hive |
hhsql , highlight-hive-sql |
Hive SQL is required |
HTML | <!--html--> , <!--!html--> |
hhtml , highlight-html |
|
CSS | /*css*/ , /*!css*/ |
hcss , highlight-css |
|
JS | //js , //!js |
hjs , highlight-javascript |
|
Yaml | --- #yaml , #!yaml |
hyaml , highlight-yaml |
- SQL
- Insert sign pair
--sql
and;
to highlight single SQL sequence.
- Insert sign pair
--beginsql
or--begin-sql
and--endsql
or--end-sql
to highlight one and more SQL suquences.
- Any SQL sequence starts with UPPERCASE keyword (such as
SELECT
,INSERT
,UPDATE
and etc) and one of WHITESPACE character(such as' ','\n','\t','\r','\f'
), and ends with;
will be highlighted automatically.
- Insert sign pair
- HTML, CSS, JS
- Yaml
- Insert sign pairs
--- #yaml
and#!yaml
to highlight YAML suquences.
- Insert sign pairs
- Other
- Snippets
- Install from VS Code extensions (
ctrl + shift + x
orcmd + shift + x
on mac). - Install from VSIX manually.
- Modify js highlight pattern to fix Issue#5.
- Add "\s*" pattern before some signs to fix Issue#1.
- Add yaml support
- Fix typos.
Please see CHANGELOG.md for more information.
If you have any suggestion or issue, please feel free to submit it at Github Issues page. Any pull requests to add more features or improve the experience are also welcome.
- Forked from bashmish/es6-string-css > ptweir/python-string-sql
- Visual Studio Code Extension API
- TextMate Manual
- Issue Highlighting of fenced code in markdown for known but non-default languages