Re: syntax highlight of sqlite3 script using bash here document

2010-07-06 Thread Benjamin R. Haskell
On Tue, 6 Jul 2010, Peng Yu wrote: > On Jul 6, 3:55 pm, "Benjamin R. Haskell" wrote: > > [...] > > The following worksforme: > > > > ==> ~/.vim/after/syntax/sh.vim <== > > unlet b:current_syntax > > syntax include @sql syntax/sql.vim > > syn region shHereDoc matchgroup=shRedir start=/<<\s*\\\=\z(\

Re: syntax highlight of sqlite3 script using bash here document

2010-07-06 Thread Peng Yu
On Jul 6, 3:55 pm, "Benjamin R. Haskell" wrote: > On Tue, 6 Jul 2010, Charles Campbell wrote: > > Benjamin R. Haskell wrote: > > > 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. Ther

Re: syntax highlight of sqlite3 script using bash here document

2010-07-06 Thread Benjamin R. Haskell
On Tue, 6 Jul 2010, Charles Campbell wrote: > Benjamin R. Haskell wrote: > > 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" expli

Re: syntax highlight of sqlite3 script using bash here document

2010-07-06 Thread Charles Campbell
Benjamin R. Haskell wrote: 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 sy

Re: syntax highlight of sqlite3 script using bash here document

2010-07-05 Thread Benjamin R. Haskell
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

Re: syntax highlight of sqlite3 script using bash here document

2010-07-05 Thread Peng Yu
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 exa

Re: syntax highlight of sqlite3 script using bash here document

2010-07-04 Thread Zoran Zaric
I hope I got your question right. You can force vim to use the highlighting for a special filetype by setting the filetype for the current buffer. :set filetype=sql did the correct highlighting of the sql-code for me. I hope this helps. Peng Yu schrieb: > Due to the fact that sqlite3 can not di

syntax highlight of sqlite3 script using bash here document

2010-07-04 Thread Peng Yu
Due to the fact that sqlite3 can not directly process a file using shebang, I have to use the here document from bash for sqlite3 script. But the syntax highlight is not correct. Does anybody have any fix to the vim default for this kind of sqlite3 script embedded in bash here document? Note that t