Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

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

3 Answers 3

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

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 –  maxmackie Jul 5 '11 at 16:52

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.