Skip to content

charleseidsness/vim-python-sql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-python-sql

This plugin enables SQL syntax highlighting inside single-quoted multiline strings in a Python file. It is heavily based on Kris Jenkins's vim-python-sql plugin, from which the rest of this README is copied with little modification:

Screenshot

Screenshot

Installation

  • Install Pathogen. (You're already using Pathogen, right?)
  • Clone this project into ~/.vim/bundle/vim-python-sql.

Usage

Whenever you edit a Python file, multiline single-quoted strings (those delimited with '''...''') will be highlighted as SQL.

Matches are case-sensitive, because that's my preference, but it's trivial to fork & change the matching rules to suit your coding style.

Notes

This repo serves as a reasonable recipe for embedded Vim syntax highlighting in general. It could easily be forked for highlighting SQL in Hibernate XML files, for example.

Credits

Thanks to Max Bane who figured out the hard stuff when when mixing Tex with Python.

See Also

vim-clojure-sql - the same plugin for SQL inside Clojure files.

About

A very simple plugin to enable SQL syntax highlighting inside strings in a Java file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%