Keybindings in VSQL - Need help!

Moderator: NorbertKrupa

Post Reply
flipperbw
Newbie
Newbie
Posts: 2
Joined: Fri Apr 27, 2012 5:00 pm

Keybindings in VSQL - Need help!

Post by flipperbw » Fri Apr 27, 2012 5:06 pm

Hi there - getting a bit frustrated with setting vsql keybindings. I'm trying to set control-left and control-right to skip words left and right, and also trying to set forward delete.

I came across this doc:
http://my.vertica.com/docs/4.1/HTML/Master/2735.htm
which explains that vsql uses the tecla library, specifically .teclarc.

So naturally, I read through the tecla docs:
ro.altech.edu/~mcs/tecla/tecla.html

And tried all of the following to no avail [note: hitting control v for the escape sequence]:
bind ^[[1;5D backward-word
bind '^[[1;5D' backward-word
bind '^[-left' backward-word
bind ^left backward-word
...etc...

When none of that worked, I tried using \bind in vsql. When that didn't work, I tried putting gibberish in the .teclarc doc, and absolutely nothing happened. It looks like it's not even being read. I have vsql version 4.1.9.

Should I be somehow doing this in .vsqlrc instead? The docs don't provide much clarity on it.

Thanks!

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Keybindings in VSQL - Need help!

Post by id10t » Fri Apr 27, 2012 6:28 pm

Hi, flipperbw!

Try next (as root in /opt/vertica/config/vsqlrc or as user in ~/.vsqlrc):

Code: Select all

\edit-mode emacs
...
\bind [1;5C forward-word 
\bind [1;5D backward-word

flipperbw
Newbie
Newbie
Posts: 2
Joined: Fri Apr 27, 2012 5:00 pm

Re: Keybindings in VSQL - Need help!

Post by flipperbw » Fri Apr 27, 2012 6:41 pm

Ah, so it works when i put it in .vsqlrc! I was confused because when I try the same thing on the command line once in vsql, the \bind command doesn't seem to do anything. Nonetheless, I'll use .vsqlrc instead of .teclarc. Thanks!

User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Re: Keybindings in VSQL - Need help!

Post by Julie » Fri Apr 27, 2012 7:20 pm

OMG, I was having a similar issue. I think you may have solved my problem too! Great!
Thanks,
Juliette

Post Reply

Return to “vSQL”