Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

that should be right. Any advice?

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

share|improve this question
Can you add which SSH client you're using. – EightBitTony Jul 5 '11 at 8:33
Take a look at this past question – UtopiaLtd Jul 5 '11 at 9:01
up vote 2 down vote accepted

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

share|improve this answer

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.

share|improve this answer

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

share|improve this answer
I'm sure vim is installed, because i did install it from source :) – Juan Sebastian Totero Jul 5 '11 at 16:29
My bad, that's odd behaviour then. Good luck – n0pe Jul 5 '11 at 16:52

You must log in to answer this question.

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