sponsor Vim development Vim logo Vim Book Ad

sql.vim : Syntax file for Sybase SQL Anywhere

 script karma  Rating 16/9, Downloaded by 4125  Comments, bugs, improvements  Vim wiki

created by
David Fishburn
script type
Syntax file for Sybase SQL Anywhere (Adaptive Server Anywhere)

Attention Vim7 users
This file has been renamed to sqlanywhere.vim and version 9.0.2 is included with Vim 7.0.
A new file syntax\sql.vim has been created which manages the appropriate loading of any sql syntax file.  See :h sql.txt for more details.

- keywords
- internal functions
- internal stored procedures,
- TSQL compatability stored procedures
- external stored procedures/functions,
- web services (HTML and XML support)
- all database options
- operators
- datatypes
- statements
- comments

Assuming you are editing a .sql file (Vim sets the filetype to be SQL), then by default Vim assumes Oracle syntax.

This syntax file works in conjunction with ftplugin/sql.vim, indent/sql.vim and syntax/sql.vim to load the correct SQL dialect.

To change from Oracle syntax to a different SQL dialect you can initiate this by running:
:SQLSetType sqlanywhere.vim
:SQLSetType <tab key> to cycle through all supported SQL dialects.
:SQLSetType sqla<tab key> to cycle through all supported SQL dialects starting with "sqla".

Or to change Vim's default Oracle dialect to SQL Anywhere you can put the following in your .vimrc:
    let g:sql_type_default = 'sqlanywhere'

To read more on these options see:
:h sql.txt

install details
Put <sql.vim> into your .vim/syntax or vimfiles/syntax directory

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
sqlanywhere.vim 12.0.1 2012-01-23 7.0 David Fishburn Latest updates for SQL Anywhere version 12.0.1 including spatial data
sqlanywhere.vim 11.0.1 2009-03-15 7.0 David Fishburn Latest updates for SQL Anywhere version 11.0.1
sqlanywhere.vim 10.0.1 2008-01-29 7.0 David Fishburn Updated to 10.0.1 to keywords.  If you are using Vim 7, the file was changed to syntax/sqlanywhere.vim.  If you are using Vim 6, you can rename the file to syntax/sql.vim.
sql.vim 9.0.2 2005-01-18 6.0 David Fishburn Support for Adaptive Server Anywhere 9.0.2
sql.vim 9.0.1 2004-02-10 6.0 David Fishburn Latest changes for the 9.0.1 release
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.