Re: psql \e and syntax highlighting in vim

From: Ireneusz Pluta <ipluta(at)wp(dot)pl>
To: damien clochard <damien(at)dalibo(dot)info>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: psql \e and syntax highlighting in vim
Date: 2010-05-18 13:40:32
Message-ID: 4BF298D0.4000205@wp.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
damien clochard pisze:
<blockquote cite="mid:4BF28D24(dot)1020702(at)dalibo(dot)info" type="cite">
<pre wrap="">Le 18/05/2010 14:36, Ireneusz Pluta a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">Hello,

how to force vim to set sql syntax highlighting, without having to
explicitly type ':set syntax=sql', every time when entering vim with \e
metacomand from psql?

Thanks

Irek.

</pre>
</blockquote>
<pre wrap=""><!---->
Have you tried to add "syntax on" to the main configuration file
(/etc/vim/vimrc) ?
</pre>
</blockquote>
Yes, it is on already, but this is global setting to highlight, if
particular syntax is set explicitly or recognized by vim. To my
understanding, it doesn't, at it is given a temporary file to work on,
like '/tmp/psql.edit.96672'. It probably might work if the tmp file was
named like '/tmp/psql.edit.96672.sql'. Or invoked with its -c"set
syntax=sql" command line switch. So, the whole question is how to have
psql to tell vim which particular syntax to use, in one of these ways.<br>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 1.2 KB

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ireneusz Pluta 2010-05-18 13:58:10 Re: psql \e and syntax highlighting in vim
Previous Message A. Kretschmer 2010-05-18 12:51:04 Re: psql \e and syntax highlighting in vim