On Mon, 5 Jul 2010, Peng Yu wrote: > No. You misunderstood me. I think that the vim can recognized the file > type by the suffix of the filename. There is no need to ":set > filetype=sql" explicitly. > > But the default syntax highlight facility in vim doesn't reliably > syntax highlight SQL code embedded in a bash script. In the following > example, the SQL code after "*.txt" is not recognized correctly.
The syntax highlighting for PHP handles highlighting other languages within heredocs. Perhaps you can find a solution somewhere in there. I believe it 'detects' the language via the heredoc label, though, so you might need to use <<SQL SQL instead of <<EOF EOF See also: :help :syn-include -- Best, Ben -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
