|
1 | | -# SQL highlighting in Python multiline strings for VS Code |
| 1 | +# Highlight String Code |
2 | 2 |
|
3 | | -Adds syntax highlight support for python multiline SQL strings in VS Code. |
| 3 | +Syntax highlighting support for some specific language code in string. |
4 | 4 |
|
5 | | -## Installation |
6 | | - |
7 | | -Install `python-string-sql` from extensions (`ctrl + shift + x` or `cmd + shift + x` on mac). |
8 | | -> Also available on [marketplace.visualstudio.com](https://marketplace.visualstudio.com/items?itemName=ptweir.python-string-sql) |
9 | | -
|
10 | | -## Example |
11 | | - |
12 | | -[](docs/demo.py) |
13 | | - |
14 | | -## Usage |
15 | | - |
16 | | -Insert `--sql`, `--beginsql`, or `--begin-sql` at the beginning of the part of the string you would like highlighted and a semicolon, `--endsql`, or `--end-sql` at the end of the highlighted section. |
| 5 | +## Requirements |
17 | 6 |
|
18 | | -### Snippets |
19 | | -begin typing `sql` and the autocomplete snippet will appear: |
| 7 | +- Visual Studio Code v1.32.0 and above is recommended |
20 | 8 |
|
21 | | - |
| 9 | +## Installation |
22 | 10 |
|
23 | | -### Keybindings |
| 11 | +- Install from [VSIX](https://github.com/iuyoy/highlight-string-code/releases) manually. |
24 | 12 |
|
25 | | -cmd+s (or ctrl+s on mac) - Insert the following snippet: |
26 | | -``` |
27 | | -""" |
28 | | ---sql |
29 | | -SELECT |
30 | | -; |
31 | | -""" |
32 | | -``` |
| 13 | +## Features & Usages |
33 | 14 |
|
34 | | -## Requirements |
| 15 | +- SQL |
| 16 | + 1. Insert sign pair `--sql` and `;` to highlight one SQL sequence. |
| 17 | +  |
| 18 | + 2. Insert sign pair `--beginsql` or `--begin-sql` and `--endsql` or `--end-sql` to highlight one and more SQL suquences. |
| 19 | +  |
| 20 | + 3. Any SQL sequence starts with **UPPERCASE** keyword (such as `SELECT`, `INSERT`, `UPDATE` and etc), and ends with `;` will be highlighted automatically. |
| 21 | +  |
| 22 | +- HTML |
| 23 | + - Insert sign pair `<!--html-->` and `<!--!html-->` to highlight one and more HTML suquences. Other comments can be added after `html` and `-->`. |
| 24 | +  |
| 25 | +- Other |
| 26 | + - Highlight Variables in *highlighted* string code. |
| 27 | +  |
35 | 28 |
|
36 | | -- Visual Studio Code v1.32.0 recommended |
37 | | -- Comments at beginning and end of highlighted section in the string (see Usage section). |
| 29 | +## TODO Notes |
38 | 30 |
|
39 | | -## Community |
40 | | -- 2018-09-04 forked from [es6-string-css](https://github.com/bashmish/es6-string-css) |
| 31 | +- [ ] Publish extension |
| 32 | +- [ ] Add switches for Highlight Signs |
41 | 33 |
|
42 | 34 | ## Release Notes |
43 | 35 |
|
44 | | -### [1.1.0] - 2019-06-04 |
45 | | -- Added support for f-strings |
46 | | - |
47 | | -### [1.0.0] - 2019-03-29 |
48 | | -- Added snippet and keybinding |
49 | | - |
50 | | -### [0.1.0] - 2019-03-28 |
51 | | -- Published on VS Code marketplace |
52 | | - |
53 | | -### [0.0.1] - 2019-03-28 |
54 | | -- Got it working based on [these instructions](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide) |
| 36 | +See [CHANGELOG.md](./CHANGELOG.md) |
55 | 37 |
|
56 | | -### [0.0.0] - 2018-09-04 |
57 | | -- Forked from es6-string-html |
| 38 | +## References |
58 | 39 |
|
| 40 | +- Forked from [bashmish/es6-string-css](https://github.com/bashmish/es6-string-css) > [ptweir/python-string-sql](https://github.com/ptweir/python-string-sql) |
| 41 | +- Visual Studio Code Extension API |
| 42 | + - [syntax-highlight-guide](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide) |
| 43 | +- TextMate Manual |
| 44 | + - [Language Grammars](https://macromates.com/manual/en/language_grammars) |
| 45 | + - [Scope Selectors](https://macromates.com/manual/en/scope_selectors) |
0 commit comments