Re: psql \e and syntax highlighting in vim

From: Ireneusz Pluta <ipluta(at)wp(dot)pl>
To: Ireneusz Pluta <ipluta(at)wp(dot)pl>
Cc: damien clochard <damien(at)dalibo(dot)info>, pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: psql \e and syntax highlighting in vim
Date: 2010-05-18 13:58:10
Message-ID: 4BF29CF2.20606@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">
<br>
<br>
Ireneusz Pluta pisze:
<blockquote cite="mid:4BF298D0(dot)4000205(at)wp(dot)pl" type="cite">
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
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>
</blockquote>
OK, after real RTFM of man psql in this area:<br>
<br>
              Tip: psql searches the environment variables 
PSQL_EDITOR,  EDI-<br>
              TOR,  and VISUAL (in that order) for an editor to use. If
all of<br>
              them are unset, vi is used on Unix systems, notepad.exe
on  Win-<br>
              dows systems.<br>
<br>
I found the solution by setting the PSQL_EDITOR to 'vim -c"set
syntax=sql"'.<br>
It works now the way I want.<br>
<br>
Thanks<br>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 1.1 KB

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Leif Biberg Kristensen 2010-05-18 14:07:21 Re: psql \e and syntax highlighting in vim
Previous Message Ireneusz Pluta 2010-05-18 13:40:32 Re: psql \e and syntax highlighting in vim