0

I've just installed Solaris 11 Express, and I can't for the life of me work out how to get vim to backspace correctly.

The backspace key works fine at the normal console.

However, under vim, it simple goes back a character, but doesn't actually delete anything.

I've tried :set bs=2, no luck.

I've tried both the included system vim (/usr/bin/vim) and OpenCSW vim (/opt/csw/bin/vim).

I've tried setting the TERM to "xterm" or "xterm-color", no change. I've pasted my termcap file here:

http://paste.pocoo.org/show/452455/

Any ideas? =(

Cheers, Victor

victorhooi
  • 515
  • 3
  • 11
  • 20

3 Answers3

1

It's likely that you're actually running vi (which is symlinked when you try to invoke vim). In vi to the best of my knowledge, in insert mode, you can't backspace stuff you didn't just type (in that insert erm... 'session'). In command mode, hitting backspace has always just moved the cursor back one character. To delete you're supposed to be using x aren't you?

user90483
  • 11
  • 1
  • Hmm, I'm fairly sure it's the vim binary - "file /opt/csw/bin/vim" returns "ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, stripped", and ls reports a 1.8 Mb binary. – victorhooi Aug 04 '11 at 23:46
0

You should try the Vim from www.sunfreeware.com, to see whether it's a environment problem or the problem of Vim you installed.

Try ssh from another Linux/UNIX to your computer and use Vim, see what happens.

inntran
  • 171
  • 3
0

Hmm, what user90483 said. I have the same behavior with vi/vim under Linux. Backspace won't actually delete anything unless you're in edit mode, not command mode. Are you in the right mode? If I hit "i", the backspace will delete things. If I hit "esc" at that point, backspace is equivalent to the "h" key and moves the cursor to the left.

Also, if you're using vi correctly, in the terminal, can you issue "stty erase " followed by ctrl-v and then the backspace key, then hit enter, before trying vim? This has the feel of the terminal "erase" being mishandled by vim; your shell may be compensating for all types of backspace signals.

cjc
  • 24,916
  • 3
  • 51
  • 70