Created
September 20, 2016 22:03
-
-
Save esdras/e6a428d73d906b55606ad8be38a0324d to your computer and use it in GitHub Desktop.
SQL embedded in vim heredoc string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Sql | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" use with vim-polyglot | |
" paste in vim-polyglot/after/syntax/ruby.vim | |
let s:bcs = b:current_syntax | |
unlet b:current_syntax | |
syn include @SQL syntax/pgsql.vim | |
let b:current_syntax = s:bcs | |
syntax region rubyHereDocSQL matchgroup=Statement start=+<<\z(SQL\)+ end=+^\z1$+ contains=@SQL | |
syntax region rubyHereDocDashSQL matchgroup=Statement start=+<<-\z(SQL\)+ end=+\s\+\z1$+ contains=@SQL | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment