pgsql.vim


Ⅰ. 插件描述

Postgresql syntax from Devrim GUNDUZ

Ⅱ. 基本信息

创建日期:  2011-11-24
使用用户:  167
Github星:  74
插件作者:  Jacek Wysocki

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/exu/pgsql.vim

Ⅳ. 文档说明

Vim Postgresql syntax file

Installation

If you use Pathogen for plugin
management, simply clone this repository into ~/.vim/bundle to make the
pgsql syntax type available:

git clone https://github.com/exu/pgsql.vim ~/.vim/bundle/pgsql.vim

If you prefer to install manually, copy syntax/pgsql.vim into your
~/.vim/syntax/ directory, creating it if necessary.

Usage

Files with the suffix .pgsql will use the pgsql highlighting automatically.

To enable pgsql syntax for any open buffer, use:

:set syntax=pgsql

Enabling for all .sql files

You can make pgsql.vim the default for SQL syntax by adding this line to your
.vimrc:

let g:sql_type_default = 'pgsql'

This tells the sql.vim module to use the pgsql dialect.

Alternately, you can use an autocmd in your ~/.vim/filetype.vim to enable it
for all .sql files or some finer pattern:

autocmd BufNewFile,BufRead *.sql setf pgsql

You do not need both. If in doubt, use the first method.

添加新评论