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 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 the complication is that environment variable can
> be used in the here document, which can be enclosed in for loop.
>
> $ cat main.sql
> #!/usr/bin/env bash
>
> rm -rf main.db
> sqlite3 main.db <<EOF
>
> .mode column
> .headers on
> .echo on
> create table test (id integer primary key, value text);
> insert into test (value) values('eenie');
> insert into test (value) values('meenie');
> insert into test (value) values('miny');
> insert into test (value) values('mo');
> insert into test (value) values('$SOME_ENV_VAR');
>
> select * from test;
>
> EOF
>
>
--
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