A very simple plugin to enable SQL syntax highlighting inside strings in a Clojure file. If you can handle the visual trip of two syntax highlighters co-existing, this plugin will provide.
Works with the standard vimclojure plugin.
- Be using the vimclojure plugin already!
- Install Pathogen. (You're already using Pathogen, right?)
- Clone this project into
Whenever you edit a Clojure file, strings starting with
"DROP 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.
This repo serves as a reasonable recipe for embedded Vim syntax highlighting in general. The next time I'm there, I'll probably write a plugin for SQL inside Hibernate XML files. Highlighting code inside docstrings is another obvious use of this approach.
vim-java-sql - the same plugin for SQL inside Java files.