Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ptweir/python-string-sql

Repository files navigation

SQL highlighting in Python multiline strings for VS Code

Adds syntax highlight support for python multiline SQL strings in VS Code.

Installation

Install python-string-sql from extensions (ctrl + shift + x or cmd + shift + x on mac).

Also available on marketplace.visualstudio.com

Example

Example

Usage

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.

Snippets

begin typing sql and the autocomplete snippet will appear:

Snippet

Keybindings

cmd+s (or ctrl+s on mac) - Insert the following snippet:

"""
--sql
SELECT
;
"""

Requirements

  • Visual Studio Code v1.32.0 recommended
  • Comments at beginning and end of highlighted section in the string (see Usage section).

Community

Release Notes

[1.2.0] - 2023年11月06日

  • Added support for mysql by allowing a space after --

[1.1.0] - 2019年06月04日

  • Added support for f-strings

[1.0.0] - 2019年03月29日

  • Added snippet and keybinding

[0.1.0] - 2019年03月28日

  • Published on VS Code marketplace

[0.0.1] - 2019年03月28日

[0.0.0] - 2018年09月04日

  • Forked from es6-string-html

About

Highlight code in python multiline strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /