set -o vi not working in bash

I am supposed to be able to use vi command-line editing and command recollection with bash.  set -o vi does not give an error but I can't invoke the previous commands pressing Esc and then k or move the cursor in the command line with h or l.  I am using Dell Dimention XPS T-500 with Complete Mandrake 6.5 distribution.  I will appreciate your help since I got used to vi command-line editing.

igorfactorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

igorfactorAuthor Commented:
Edited text of question.
0
igorfactorAuthor Commented:
Adjusted points to 60
0
dan_2228593Commented:
so what happens when you use the j, k keys?

also do

set -o vi

then

set -o

to see if vi mode if turned on?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

tk36Commented:
Try Ctrl+P for previous command.
and Ctrl+N for Next command
Then Ctrl+B for backward
and Ctrl+F for forward
0
igorfactorAuthor Commented:
set -o returns that vi is on.  Ctrl-P etc. don't work
0
igorfactorAuthor Commented:
The proposed answer doesn't work.  When I hit Esc and then,  say,  'k', I am getting a beep, next keys I hit are typed in the screen.  'set -o' returns that vi is on.
0
igorfactorAuthor Commented:
The proposed answer doesn't work.  When I hit Esc and then,  say,  'k', I am getting a beep, next keys I hit are typed in the screen.  'set -o' returns that vi is on.
0
tk36Commented:
Sorry iqofactor, It works on SuSE 6.2 and we don't have Mandrake, so we can't investigate for you.
0
jyu_88Commented:
The /etc/inputrc coming with RedHat has some funky mapping. remove the last several funny looking lines. Wonder if Mandrake would have similar problem.
Another thing to be sure is that you are in a bash. type 'bash' then try 'set -o vi', then try command line editing.
Also, if you are using a telnet client to access your Mandrake box, try different key/simulation mapping such as netterm, etc.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
yubbyCommented:
I believe that the answer actually is (assuming RedHat's installation of the initial "/etc/inputrc" file):

copy /etc/inputrc to /etc/inputrc.org
vi /etc/inputrc

## remove ALL lines since they refer to Emacs controls,  and add the lines:

set editing-mode vi
set keymap vi
0
igorfactorAuthor Commented:
This is a good idea. But in multiuser environment it would, probably, be better if we put the user preferred options into ~/.inputrc and make  /etc/inputrc have the only line:

$include ~/.inputrc
0
yubbyCommented:
All users must submit to "vi"...  (or die..).

If the few (like the DBA's) still want to use Emacs, they can configure it manually (as you suggested above)...

The 'gist' of my suggestion was to change the 'default' from Emacs to vi  (obviously not improving on the 'system-wide' issue...)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.