Skip site navigation (1) Skip section navigation (2)

Re: psql \e and syntax highlighting in vim

From: Ireneusz Pluta <ipluta(at)wp(dot)pl>
To: damien clochard <damien(at)dalibo(dot)info>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: psql \e and syntax highlighting in vim
Date: 2010-05-18 13:40:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
damien clochard pisze:
<blockquote cite="mid:4BF28D24(dot)1020702(at)dalibo(dot)info" type="cite">
  <pre wrap="">Le 18/05/2010 14:36, Ireneusz Pluta a écrit :
  <blockquote type="cite">
    <pre wrap="">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?



  <pre wrap=""><!---->
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.<br>

Attachment: unknown_filename
Description: text/html (1.2 KB)

In response to


pgsql-novice by date

Next:From: Ireneusz PlutaDate: 2010-05-18 13:58:10
Subject: Re: psql \e and syntax highlighting in vim
Previous:From: A. KretschmerDate: 2010-05-18 12:51:04
Subject: Re: psql \e and syntax highlighting in vim

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group