Syntax highlight SQL inside <<-SQL heredocs
Similar principle will work to embed other syntaxen, e.g., HTML.
Optional: requires https://github.com/exu/pgsql.vim
syntax include @SQL syntax/pgsql.vimSyntax highlight SQL inside <<-SQL heredocs
Similar principle will work to embed other syntaxen, e.g., HTML.
Optional: requires https://github.com/exu/pgsql.vim
syntax include @SQL syntax/pgsql.vim| " ~/.vim/after/syntax/ruby.vim | |
| let s:bcs = b:current_syntax | |
| unlet b:current_syntax | |
| syntax include @SQL syntax/sql.vim | |
| let b:current_syntax = s:bcs | |
| syntax region rubyHereDocSQL matchgroup=Statement start=+<<-\?SQL+ end=+^\s*SQL$+ contains=@SQL |
Wow this works great! Thanks so much! I'm pushing it as a pull request to hashrocket/dotmatrix.