1

I'm currently developing some projects on an AIX machine connecting to ir using SSH. I compiled and installed vim in my home folder but I have some problems:

  1. When entering interactive mode, vim does not advice me of it,
  2. The arrow keys are not working as expected (but Arrows in the Numpad work)

I checked in the terminal

echo $TERM
xterm

that should be right. Any advice?

EDIT: I'm currently using OpenSSH on a linux machine (Ubuntu)

2

3 Answers 3

2

To be informed when entering Insert mode

:set showmode

As for the arrow keys, it looks like your terminal might not be setting up application cursor keys correctly, or your Vim isn't expecting them because the AIX terminal definition is incorrect.

If while in Vim's insert mode, you type Ctrl-V
you should see either ^[OD or ^[[D

The first of these is sent when Application Cursor Keys is set in the terminal, the other (^[[D) is sent when Normal Cursor Keys is set.

↑   ^[A ^OA
↓   ^[B ^OB

^[C ^OC
^[D ^OD

1

Are you in compatible mode? Try typing ":set compatible?" (with the question mark). If you are, it means you need to create a ~/.vimrc file, which will automatically cause Vim to go into nocompatible mode, which will hopefully enable the arrow keys.

In that file you can put ":set showmode" to cause Vim to display what mode you re in.

0

I'm on an AIX machine right now and that happens to me frequently. However I think it has everything to do with running vi as opposed to vim.

Vim is not installed on AIX by default, only vi is. Give it a try:

$ vim
/bin/ksh: vim:  not found.

If you install vim you will most likely have arrow key support right out of the box. Otherwise, you and I both need to get used to hjkl

2
  • 1
    I'm sure vim is installed, because i did install it from source :) Jul 5, 2011 at 16:29
  • My bad, that's odd behaviour then. Good luck
    – n0pe
    Jul 5, 2011 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .