Re: Updated .vim file

From: David Fetter <david(at)fetter(dot)org>
To: Decibel! <decibel(at)decibel(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Updated .vim file
Date: 2007-10-31 14:00:43
Message-ID: 20071031140043.GD10414@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 30, 2007 at 01:58:29PM -0500, Decibel! wrote:
> Does anyone have a .vim file that takes dollar quoting into account?
> I've tried the one mentioned at
> http://archives.postgresql.org/pgsql-general/2006-04/msg01266.php , but
> it doesn't appear to understand dollar quotes.

The magic appears to be something like:

:syn match pgsqlMyMatch /\$\$.\{.}\$\$/

The real regex would look a lot hairier for arbitrary legal dollar
quoting constructs, but if you standardize on something like what's
below, it should be easier.

Cheers,
David.

CREATE [OR REPLACE] FUNCTION foo(
input,
params,
here,
[OUT put_params_here,
...]
)
RETURNS [SETOF] SOMETYPE
[IMMUTABLE]
[STRICT]
LANGUAGE plbar
AS $[STUFF]$
...
$[STUFF]$;
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-10-31 14:30:48 Re: configure password
Previous Message Phoenix Kiula 2007-10-31 14:00:41 Replacing RDBMS