external editor for psql

Started by John Smithover 18 years ago3 messagesgeneral
Jump to latest
#1John Smith
jayzee.smith@gmail.com

http://www.nabble.com/need-good-editor-for-postgreSQL-tf3660882.html#a10229560

how do u get gvim (portable?) to do syntax color highlighting for
sql/plpgsql on files in buffer?? you're right- notepad is not enough
(and pgedit is not free).

cheers, jzs

#2Reg Me Please
regmeplease@gmail.com
In reply to: John Smith (#1)
Re: external editor for psql

Il Tuesday 06 November 2007 16:40:27 John Smith ha scritto:

http://www.nabble.com/need-good-editor-for-postgreSQL-tf3660882.html#a10229
560

how do u get gvim (portable?) to do syntax color highlighting for
sql/plpgsql on files in buffer?? you're right- notepad is not enough
(and pgedit is not free).

cheers, jzs

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

1. I've looked for the PostgreSQL syntax script by Manni Wood.
(I don't remember from where, maybe www.vim.org)

2. I've installed it as /usr/share/vim/vim71/syntax/postgresql.vim

3. I've edited /usr/share/vim/vim71/filetype.vim in order to add
this line:

au BufNewFile,BufRead *.psql setf postgresql

Now all .psql files get the Posgres highlighting.

--
Reg me Please

#3Scott Marlowe
scott.marlowe@gmail.com
In reply to: John Smith (#1)
Re: external editor for psql

On 11/6/07, John Smith <jayzee.smith@gmail.com> wrote:

http://www.nabble.com/need-good-editor-for-postgreSQL-tf3660882.html#a10229560

how do u get gvim (portable?) to do syntax color highlighting for
sql/plpgsql on files in buffer?? you're right- notepad is not enough
(and pgedit is not free).

Don't know about gvim but vim automagicall does it for files that end in .sql

I also use Gedit a lot on my workstation and it does color
highlighting of .sql files as well.