Reputation: 33415
From vim's documentation
Vim currently supports the Oracle and Informix dialects of SQL. Vim assumes "*.sql" files are Oracle SQL by default.
I am writing for Informix. How do I tell vim to use that dialect for syntax highlighting?
Upvotes: 1
Views: 555
Reputation: 15176
To change the global default you need
let g:sql_type_default = 'sqlinformix'
:SQLSetType
is used to change dialect for an open buffer.
Upvotes: 1
Reputation: 94602
From the same vim docs:
For the people that work with many different databases, it is nice to be able to flip between the various vendors rules (indent, syntax) on a per buffer basis, at any time. The ftplugin/sql.vim file defines this function:
SQLSetType
So run
:runtime ftplugin/sql.vim " If it's not already read
:SQLSetType sqlinformix
Upvotes: 1