For vim users: Syntax highlighting for PostgreSQL

Lists: pgsql-general
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: 1146181393.2949.15.camel@laptop.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

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

http://www.gunduz.org/postgresql/pgsql.vim

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

" PgSQL
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.

Regards,
--
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 - http://www.commandprompt.com/


From: Terry Lee Tucker <terry(at)esc1(dot)com>
To: PostgreSQL - General <pgsql-general(at)postgresql(dot)org>
Subject: Re: For vim users: Syntax highlighting for PostgreSQL
Date: 2006-04-28 07:54:46
Message-ID: 200604280354.46586.terry@esc1.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Thursday 27 April 2006 07:43 pm, Devrim GUNDUZ <devrim(at)commandprompt(dot)com>
thus communicated:
--> Hi,
-->
--> I just wrote a pgsql.vim file for vim users. It helps you to colorize
--> the file which contains PostgreSQL SQL keywords:
-->
--> http://www.gunduz.org/postgresql/pgsql.vim
-->
--> In order to use this file, first edit filetype.vim file and add
-->
--> " PgSQL
--> 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.
-->
--> Regards,
--> --
--> 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 - http://www.commandprompt.com/
-->
-->
--> ---------------------------(end of broadcast)---------------------------
--> TIP 6: explain analyze is your friend
-->
Thanks! I'll check this out ;o)


From: brsaweda(at)gmail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Re: For vim users: Syntax highlighting for PostgreSQL
Date: 2006-05-01 22:15:28
Message-ID: 1146521728.308139.226130@j33g2000cwa.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


Devrim GUNDUZ wrote:
> Hi,
>
> I just wrote a pgsql.vim file for vim users. It helps you to colorize
> the file which contains PostgreSQL SQL keywords:
(...)

> - 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.

Thank you! I find this useful and am testing it.
Should feedback go to this thread in the newsgroup or to your email
account or another channel?

Regards
Erwin


From: Devrim GUNDUZ <devrim(at)commandprompt(dot)com>
To: brsaweda(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: For vim users: Syntax highlighting for PostgreSQL
Date: 2006-05-02 21:42:55
Message-ID: 1146606175.2471.16.camel@laptop.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

On Mon, 2006-05-01 at 15:15 -0700, brsaweda(at)gmail(dot)com wrote:

> Thank you! I find this useful and am testing it.

Great to hear that. I'm also working on plpgsql.vim file.

> Should feedback go to this thread in the newsgroup or to your email
> account or another channel?

I think e-mail to me is fine.

Regards,
--
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: plPHP, plPerlNG - http://www.commandprompt.com/


From: Fernan Aguero <fernan(at)iib(dot)unsam(dot)edu(dot)ar>
To: Devrim GUNDUZ <devrim(at)commandprompt(dot)com>
Cc: PostgreSQL - General <pgsql-general(at)postgresql(dot)org>
Subject: Re: For vim users: Syntax highlighting for PostgreSQL
Date: 2006-05-02 23:58:16
Message-ID: 20060502235816.GA58229@iib.unsam.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

+----[ Devrim GUNDUZ <devrim(at)commandprompt(dot)com> (27.Apr.2006 23:39):
|
| Hi,
|
| I just wrote a pgsql.vim file for vim users. It helps you to colorize
| the file which contains PostgreSQL SQL keywords:
|
| http://www.gunduz.org/postgresql/pgsql.vim

Devrim,

thanks for contributing this!

| In order to use this file, first edit filetype.vim file and add
|
| " PgSQL
| 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.

This is not necessary. You can add it to your ~/.vimrc and
it will work. If you want to set this system wide you can
include the above command inthe system wide vimrc (in my
FreeBSD box this is /usr/local/share/vim/vimrc)

| 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.
|
+----]

Again, you can also put it in ~/.vim/syntax/ and it will
work.

Just wanted to add that without have root access anyone
can still benefit from your work!

Thanks again!

Fernan