pgsql.vim


Ⅰ. 插件描述

Vim PostgreSQL syntax

Ⅱ. 基本信息

创建日期:  2016-06-24
使用用户:  1
Github星:  1
插件作者:  Andrii Vasyliev

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

pgsql.vim

Vim PostgreSQL syntax file

Provides syntax highlighting for PostgreSQL specific SQL files.

Installation

Use Vundle.

Place this in your .vimrc:

Plugin 'hiqsol/pgsql.vim'

… then run the following in Vim:

:source %
:PluginInstall

Usage

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

To enable pgsql syntax for any open buffer, use:

:set syntax=pgsql

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.

Acknowledgements

This plugin is based on https://github.com/exu/pgsql.vim

添加新评论