VI editor doesn't work properly

Asked by chris

When editing file with vi, it works well as far as I don't try to modify the file. When I hit insert key the word INSERT doesn't appear at the lower left corner of VI. I also have to hit insert key twice to be able to add/modify line.

Hitting backspace to delete characters, does not do nothing.
Down arrow produce letter B. Right arrow produce C. Left arrow produce D and Up arrow produce A.

To edit a line to let say replace a word, I have to do backspace from end to start of word, then
hitting delete, removes letter. Then I can type what I want.

ESC key works well as well as :wq.
But as said, I never see INSERT in lower left corner. And I have to hit twice insert key
to be able to edit the file.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu vim Edit question
Assignee:
No assignee Edit question
Solved by:
mobes
Solved:
Last query:
Last reply:
Revision history for this message
Ralph Janke (txwikinger) said :
#1

Thanks for this question.

If you use ":help" in vi, you will get a help screen that explains the usage of vi/vim.

Hope this helps.

Revision history for this message
chris (csawyer) said :
#2

already did that. Its not a usage problem. I use it all days in Ubuntu 7.10, centos 5.1 and mandriva 2008. The above behavior is really an issue with ubuntu 2008 hardy feron. I think it is related with the mix of english and french language on the same box.

Revision history for this message
Ralph Janke (txwikinger) said :
#3

Do you have a different locale or term configuration in Ubuntu 7.10 and Ubuntu 8.04?

Revision history for this message
Wanderson Santiago dos Reis (wasare) said :
#4

before using vi try $ export VISUAL=vim

Revision history for this message
Best mobes (jmoberley) said :
#5

I was having the same issue. Only English here.

I ran:

$ sudo apt-get install vim

Works as expected now.

Revision history for this message
chris (csawyer) said :
#6

Thanks mobes, that solved my question.

Revision history for this message
dmuir (dmuir) said :
#7

mobes is awesome. Fixed the issue for me too (fresh install of Jaunty en-US). Even get code highlighting now, which I never had before. :-) Has someone reported this as a bug?

Revision history for this message
anatoly techtonik (techtonik) said :
#8

dmuir, actually for VI editor (launched as `vi`) it is the expected behavior. For proper work with arrow and other keys you need VIM (`vim` from command line).

Revision history for this message
David (davidvillegasr) said :
#9

Thanks very much for your help. his iswhat I needed :)