3

My terminal gets polluted by B, C,A,D when I try to navigate within vim using arrow keys and on delete using backspace it only scrolls back without deleting the characters on screen while the characters are actually deleted.

How do I fix this?

I have installed vim using homebrew. Its version is:

$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 16 2013 21:10:21)
MacOS X (unix) version
Included patches: 1-923
k0pernikus
  • 15,463

2 Answers2

3

I would first try this :

:set nocompatible

Which will disable vi compatibility mode if it is enabled.

If that fixes the problem, add this to your ~/.vimrc

set nocompatible
mveroone
  • 937
0

I used the default .vimrc:

cp /usr/share/vim/vimrc ~/.vimrc

The content is:

set modelines=0     " CVE-2007-2438
set nocompatible    " Use Vim defaults instead of 100% vi compatibility
set backspace=2     " more powerful backspacing
au BufWrite /private/tmp/crontab.* set nowritebackup
au BufWrite /private/etc/pw.* set nowritebackup
k0pernikus
  • 15,463