sql.vim


Ⅰ. 插件描述

Syntax file for Sybase SQL Anywhere

Ⅱ. 基本信息

创建日期:  2004-02-10
使用用户:  1
Github星:  1
插件作者:  David Fishburn

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/sql-vim-care-of-itself'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/sql-vim-care-of-itself'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/sql-vim-care-of-itself'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/sql.vim--Fishburn-syntax

Ⅳ. 文档说明

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 syntaxsql.vim has been created which manages the appropriate loading of any sql syntax file.  See :h sql.txt for more details.

Supports

  • 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
or
:SQLSetType <tab key> to cycle through all supported SQL dialects.
or
: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

添加新评论