November 23, 2024, 11:44:21 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: arrow keys and vi  (Read 7684 times)

Offline pichel

  • Linux Noob !
  • *
  • Posts: 4
arrow keys and vi
« on: February 27, 2008, 12:32:42 AM »
Hello,
when using vi, locally or remotely, and depending on the distro or combination of them (debian, ubuntu, mac os X) I occasionnaly find some difficulty with the arrow keys. Let me explain :

  • When everything goes well, if I'm in insert mode (esc - i or a), I can type text  and then move to the next line quickly using the arrow keys
  • When it goes wrong, using the arrow keys in this mode results in inserting a new line with a command character on it. The only way is to escape to command mode to delete the offending line and beeing able again to use the arrows.

I think of a misconfigured keyboard option somewhere, but where ? And strange enough, it can goes well from the mac with ssh control over a debian for example, where locally I'll have the problem... Where should I search ? I'm quite lost in all vi options and settings to know exactly where to look.

Thank you

Michel

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: arrow keys and vi
« Reply #1 on: February 28, 2008, 12:37:32 AM »
You know, in earlier days keyboard used to have only alphanumeric keys and not those extra arrow keys and numeric keys.So you might be right though I am not facing similar problem here but had faced few times at other machines but apart of  giving some commands on CLI .. I do not bother much as mostly coding etc. is done GUI.
I am not sure if there is any such setting for changing what VI see as keyboard.. but I will look .

Offline RazaMetaL

  • Linux Noob !
  • *
  • Posts: 14
Re: arrow keys and vi
« Reply #2 on: March 12, 2008, 04:56:47 AM »
Try installing vim :

aptitude install vim