Re: psql \e and syntax highlighting in vim - Mailing list pgsql-novice

From Ireneusz Pluta
Subject Re: psql \e and syntax highlighting in vim
Date
Msg-id 4BF29CF2.20606@wp.pl
Whole thread Raw
In response to Re: psql \e and syntax highlighting in vim  (Ireneusz Pluta <ipluta@wp.pl>)
Responses Re: psql \e and syntax highlighting in vim  (Leif Biberg Kristensen <leif@solumslekt.org>)
List pgsql-novice
Ireneusz Pluta pisze:


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.


OK, after real RTFM of man psql in this area:

              Tip: psql searches the environment variables 
PSQL_EDITOR,  EDI-
              TOR,  and VISUAL (in that order) for an editor to use. If
all of
              them are unset, vi is used on Unix systems, notepad.exe
on  Win-
              dows systems.

I found the solution by setting the PSQL_EDITOR to 'vim -c"set
syntax=sql"'.
It works now the way I want.

Thanks

pgsql-novice by date:

Previous
From: Ireneusz Pluta
Date:
Subject: Re: psql \e and syntax highlighting in vim
Next
From: Leif Biberg Kristensen
Date:
Subject: Re: psql \e and syntax highlighting in vim