Skip site navigation (1) Skip section navigation (2)

For vim users: Syntax highlighting for PostgreSQL

From: Devrim GUNDUZ <devrim(at)commandprompt(dot)com>
To: PostgreSQL - General <pgsql-general(at)postgresql(dot)org>
Subject: For vim users: Syntax highlighting for PostgreSQL
Date: 2006-04-27 23:43:13
Message-ID: (view raw or whole thread)
Lists: pgsql-general

I just wrote a pgsql.vim file for vim users. It helps you to colorize
the file which contains PostgreSQL SQL keywords:

In order to use this file, first edit filetype.vim file and add 

au BufNewFile,BufRead *.pgsql                   setf pgsql

to the relevant part. We will need to do this until this file becomes an
official part of vim.

Then put pgsql.vim to the syntax directory of vim
(/usr/share/vim/vim64/syntax on my Fedora Core 5). After you rename your
sql file as filename.pgsql, the syntax highlighting will be enabled.

What I've added so far:

- All the functions
- All the data types
- Many of the keywords (let us see if I've missed anything)
- Comments

I've used mysql.vim as a template. Thanks to \df, \dT and psql's -E for
making this process easier. :)

If you are vim user, please test it and send the possible
errors/additions to me. I intend to send this file to vim developers,
too, after the testing.

The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: PL/php, plPerlNG -


pgsql-general by date

Next:From: Jerry SieversDate: 2006-04-28 00:25:20
Subject: Re: Checking for Foreign Keys constraining a record?
Previous:From: Benjamin SmithDate: 2006-04-27 23:38:35
Subject: Checking for Foreign Keys constraining a record?

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group