sponsor Vim development Vim logo Vim Book Ad

sqlserver.vim : Syntax file for SQL Server 2005/2008

 script karma  Rating 55/28, Downloaded by 3399  Comments, bugs, improvements  Vim wiki

created by
Benjamin Hoffstein
 
script type
syntax
 
description
This is a syntax file for SQL Server 2005/2008.  All TSQL and ODBC keywords are included, as well as a comprehensive list of functions, system variables, system stored procedures, server options, and future keywords (as defined by Microsoft).

For complete source history or to file a bug report/issue (please use Wiki tab for this), please visit:
http://github.com/hoffstein/vim-tsql/tree/master
 
install details
1)  Put the sqlserver.vim file in your syntax directory.

On Windows, this is $VIM/vimfiles/syntax or $HOME/vimfiles/syntax.
On Linux, this is $HOME/.vim/syntax or $VIM/vimfiles/syntax.

2) If you want to make this your default syntax file for .sql files, add the following to your vimrc:
    
    let g:sql_type_default = "sqlserver"

3) If you want to associate this syntax file with another extension, add the following to your vimrc (replace "ext" with the desired extension):

    au BufNewFile,BufRead *.ext set filetype=sqlserver

4) The file contains instructions for enabling/disabling several highlighting options (for example, system stored procedures).  By default, all syntax is highlighted.
 

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
sqlserver.vim 1.0.2 2009-01-13 6.0 Benjamin Hoffstein Corrected highlighting of DATEPART function parameters.
sqlserver.vim 1.0.1 2008-12-04 6.0 Benjamin Hoffstein Added a few missing keywords (PERSISTED, OPENXML), reorganized source file with folding, and updated fileformat to unix.
sqlserver.vim 1.0.0 2008-11-18 6.0 Benjamin Hoffstein Initial upload
ip used for rating: 44.223.94.103

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.
   
Vim at Github