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 4BF298D0.4000205@wp.pl
Whole thread Raw
In response to Re: psql \e and syntax highlighting in vim  (damien clochard <damien@dalibo.info>)
Responses Re: psql \e and syntax highlighting in vim  (Ireneusz Pluta <ipluta@wp.pl>)
List pgsql-novice
damien clochard pisze:

  Le 18/05/2010 14:36, Ireneusz Pluta a écrit :


    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.




Have you tried to add "syntax on" to the main configuration file
(/etc/vim/vimrc) ?


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.

pgsql-novice by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: psql \e and syntax highlighting in vim
Next
From: Ireneusz Pluta
Date:
Subject: Re: psql \e and syntax highlighting in vim