Author Topic: VIM question  (Read 2913 times)

mizo

  • Newbie
  • *
  • Posts: 8
    • View Profile
VIM question
« on: July 30, 2004, 06:19:06 am »
Hello,

My arrow keys don't work in VIM insert mode. In the normal mode the keys work nicely and I can move around with arrows.

When I press the arrow keys in insert mode, I get the last character of the escape secuence (A, B, C or D) and a newline.

I have tried under xterm and aterm, both have the same problem. In plain console, the arrow keys work better but not perfectly.

Surprisingly, in plain old vi I can use the arrow keys perfectly in all modes... But I need syntax highlighting.

Can anyone point me to some config file where the problem might be?

projekt

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
VIM question
« Reply #1 on: February 19, 2005, 04:32:50 am »
I am having the same problem in vim, in insert mode the arrows are broken.

Zumi

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
    • http://
VIM question
« Reply #2 on: February 19, 2005, 06:51:22 am »
:set nocompatible


You can use it every time you start vim if you make a .vimrc file in your home directory and put "set nocompatible" in it.

My .vimrc file:
Code: [Select]
set ruler
set nocompatible
set backspace=indent,eol,start
set autoindent

Zumi
SL-C860: pdaXrom 1.1.0beta1
SD: 1GB A-data, GPS: Haicom HI-303S, Bluetooth: Nokia DTL-1 CF, CF WiFi: ASUS SpaceLink WL-110
Browse user contributed packages for pdaXrom!

projekt

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
VIM question
« Reply #3 on: February 19, 2005, 07:24:19 am »
Hi Zumi

That's not what I mean at all.  I always have vim set in nocp.. That's not the issue.  In the terminal, without X, vim works fine in insert mode.  But, under ratpoison, when I move around in insert mode in xterm, I get the letter A B C D instead of moving up, down, left, right (or whatever the order is, the fact is it puts down characters instead of moving)

Sorry for not making that clear.

Zumi

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
    • http://
VIM question
« Reply #4 on: February 19, 2005, 09:03:38 am »
Quote
Hi Zumi

That's not what I mean at all.  I always have vim set in nocp.. That's not the issue.  In the terminal, without X, vim works fine in insert mode.  But, under ratpoison, when I move around in insert mode in xterm, I get the letter A B C D instead of moving up, down, left, right (or whatever the order is, the fact is it puts down characters instead of moving)

Sorry for not making that clear.[div align=\"right\"][a href=\"index.php?act=findpost&pid=67840\"][{POST_SNAPBACK}][/a][/div]
You (and mizo) did make that clear. I simply moved my .vimrc to another file, checked whether this type of problem is there. It was. Then I typed :set nocompatible and the problem was solved for me. (The a, b, c, d thing with the cursor keys.)
Make sure you are in nocompatible mode, this caused the problem for me. I'm using fvwm as a WM.
« Last Edit: February 19, 2005, 09:04:55 am by Zumi »
SL-C860: pdaXrom 1.1.0beta1
SD: 1GB A-data, GPS: Haicom HI-303S, Bluetooth: Nokia DTL-1 CF, CF WiFi: ASUS SpaceLink WL-110
Browse user contributed packages for pdaXrom!