tags:

views:

66

answers:

2

I've just downloaded GVIM for the PC and MacVIM for the Mac and they both have different behaviour to the VIM I was using in MSYS.

Here's the problem. I bring up a file in VIM and enter insert mode. I can no longer delete any of old text. I can insert new text and delete them just fine so I know my backspace and delete keys are working. What's even more annoying that if I move the cursor to another line and come back to my original one, the new text I've typed becomes undeletable as well.

The command line VIM allows me to delete old text in insert mode but the GUI versions do not. I've looked in the options and googled but have not come up with anything.

Does anyone know how I can make the GUI version behave like the command line version of VIM?

+3  A: 

Check the output of

:set backspace?

It will likely say something like

backspace=indent,eol

This means you can hit backspace to delete over end of line and indent characters. To be able to delete text that was present before you went into insert mode, you need to add 'start'.

:set backspace=indent,eol,start

This is equivalent to

:set backspace=2

For more details see

:help 'backspace'
michaeltwofish
Perfect! That fixed it.
Cthutu
A: 

The vi in msys is just an older version of vim. (5.8.9 in msys 1.0.10). So either the defaults changed or you are using a different settings file for gvim than you are for msys.

dar512