Adds syntax highlight support for python multiline SQL strings in VS Code.
Install python-string-sql
from extensions (ctrl + shift + x
or cmd + shift + x
on mac).
Also available on marketplace.visualstudio.com
Insert --sql
, --beginsql
, or --begin-sql
at the beginning of the part of the string you would like highlighted (with or without a space after --, e.g. -- sql
) and a semicolon, --endsql
, or --end-sql
at the end of the highlighted section.
begin typing sql
and the autocomplete snippet will appear:
cmd+s (or ctrl+s on mac) - Insert the following snippet:
"""
--sql
SELECT
;
"""
- Visual Studio Code v1.32.0 recommended
- Comments at beginning and end of highlighted section in the string (see Usage section).
- 2018-09-04 forked from es6-string-css
- Added support for mysql by allowing a space after --
- Added support for f-strings
- Added snippet and keybinding
- Published on VS Code marketplace
- Got it working based on these instructions
- Forked from es6-string-html