Windows default editor for psql \e

Started by Richard Broersma Jrover 19 years ago7 messagesgeneral
Jump to latest
#1Richard Broersma Jr
rabroersma@yahoo.com

Does anyone know how to change the default editor from NOTEPAD to something link gVim? It would be
nice to use an editor with a little more smarts.

Regards,

Richard Broersma jr.

#2Bruce Momjian
bruce@momjian.us
In reply to: Richard Broersma Jr (#1)
Re: Windows default editor for psql \e

Richard Broersma Jr wrote:

Does anyone know how to change the default editor from NOTEPAD to something link gVim? It would be
nice to use an editor with a little more smarts.

Sure, see the psql manual page, but setting EDITOR is the easiest way.
This works on Win32 too.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#3Richard Broersma Jr
rabroersma@yahoo.com
In reply to: Bruce Momjian (#2)
Re: Windows default editor for psql \e

Sure, see the psql manual page, but setting EDITOR is the easiest way.
This works on Win32 too.

c:\set EDITOR="c:\Program Files\Vim\vim70\gvim.exe"

Thanks Bruce, this worked like a charm!

And sorry to drag this, but does anyone know the windows (xp) equivalent to:
/etc/rc.conf for *nix? i.e. the place that windows uses to store system wide variables from future
use? Is still the autoexec.bat? :o)

Regards,

Richard Broersma Jr.

#4Bruce Momjian
bruce@momjian.us
In reply to: Richard Broersma Jr (#3)
Re: Windows default editor for psql \e

Richard Broersma Jr wrote:

Sure, see the psql manual page, but setting EDITOR is the easiest way.
This works on Win32 too.

c:\set EDITOR="c:\Program Files\Vim\vim70\gvim.exe"

Thanks Bruce, this worked like a charm!

And sorry to drag this, but does anyone know the windows (xp) equivalent to:
/etc/rc.conf for *nix? i.e. the place that windows uses to store system wide variables from future
use? Is still the autoexec.bat? :o)

OK, I am freaked out that I know the answer to this, but it My
Computer/Properties/Advanced/Environment Variables.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#5Richard Broersma Jr
rabroersma@yahoo.com
In reply to: Bruce Momjian (#4)
Re: Windows default editor for psql \e

Richard Broersma Jr wrote:

Sure, see the psql manual page, but setting EDITOR is the easiest way.
This works on Win32 too.

c:\set EDITOR="c:\Program Files\Vim\vim70\gvim.exe"

Thanks Bruce, this worked like a charm!

And sorry to drag this, but does anyone know the windows (xp) equivalent to:
/etc/rc.conf for *nix? i.e. the place that windows uses to store system wide variables from

future

use? Is still the autoexec.bat? :o)

OK, I am freaked out that I know the answer to this, but it My
Computer/Properties/Advanced/Environment Variables.

:-) Thanks.
Just as a side note. When I specified the path string to gvim, I had leave it without quotation.
However, I need the quotations when I specified the path from the DOS prompt.

Once again thanks for the help.

Regards,

Richard Broersma Jr.

#6Joshua D. Drake
jd@commandprompt.com
In reply to: Bruce Momjian (#4)
Re: Windows default editor for psql \e

On Tue, 2006-11-28 at 22:59 -0500, Bruce Momjian wrote:

Richard Broersma Jr wrote:

Sure, see the psql manual page, but setting EDITOR is the easiest way.
This works on Win32 too.

c:\set EDITOR="c:\Program Files\Vim\vim70\gvim.exe"

Thanks Bruce, this worked like a charm!

And sorry to drag this, but does anyone know the windows (xp) equivalent to:
/etc/rc.conf for *nix? i.e. the place that windows uses to store system wide variables from future
use? Is still the autoexec.bat? :o)

OK, I am freaked out that I know the answer to this, but it My
Computer/Properties/Advanced/Environment Variables.

Is this something we shoudl doc?

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

#7Bruce Momjian
bruce@momjian.us
In reply to: Joshua D. Drake (#6)
Re: Windows default editor for psql \e

Joshua D. Drake wrote:

On Tue, 2006-11-28 at 22:59 -0500, Bruce Momjian wrote:

Richard Broersma Jr wrote:

Sure, see the psql manual page, but setting EDITOR is the easiest way.
This works on Win32 too.

c:\set EDITOR="c:\Program Files\Vim\vim70\gvim.exe"

Thanks Bruce, this worked like a charm!

And sorry to drag this, but does anyone know the windows (xp) equivalent to:
/etc/rc.conf for *nix? i.e. the place that windows uses to store system wide variables from future
use? Is still the autoexec.bat? :o)

OK, I am freaked out that I know the answer to this, but it My
Computer/Properties/Advanced/Environment Variables.

Is this something we shoudl doc?

Done, and backpatched to 8.2.X.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachments:

/rtmp/difftext/x-diffDownload+7-0