Re: psql \e and syntax highlighting in vim
От | Ireneusz Pluta |
---|---|
Тема | Re: psql \e and syntax highlighting in vim |
Дата | |
Msg-id | 4BF298D0.4000205@wp.pl обсуждение исходный текст |
Ответ на | Re: psql \e and syntax highlighting in vim (damien clochard <damien@dalibo.info>) |
Ответы |
Re: psql \e and syntax highlighting in vim
|
Список | 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 по дате отправления: