How to set Default Editor for vsql in Linux

Moderator: NorbertKrupa

Post Reply
askh01
Newbie
Newbie
Posts: 11
Joined: Fri Jan 25, 2013 10:08 pm

How to set Default Editor for vsql in Linux

Post by askh01 » Wed Dec 18, 2013 4:07 am

Hi,

What command to use to set the default editor to "vi" in vsql? I tried the following and seems not working

export VSQL_EDITOR=vi

Thanks,

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: How to set Default Editor for vsql in Linux

Post by JimKnicely » Wed Dec 18, 2013 7:55 pm

Hi,

Where are you running the export command?
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

askh01
Newbie
Newbie
Posts: 11
Joined: Fri Jan 25, 2013 10:08 pm

Re: How to set Default Editor for vsql in Linux

Post by askh01 » Thu Dec 19, 2013 2:34 am

I'm running it on "$" prompt

$ export VSQL_EDITOR=vi

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: How to set Default Editor for vsql in Linux

Post by JimKnicely » Thu Dec 19, 2013 4:23 am

Hi,

So, after setting the VSQL_EDITOR variable to vi, which editor is launched in vsql when you type \e ?

Is vi an alias on your system?

For example, on mine, vi is an alias for vim:

Code: Select all

[dbadmin@vtest01 ~]$ which vi
alias vi='vim'
	/usr/bin/vim
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “vSQL”