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.