Home > Programming, Technology > vim backspace issue quick fix

vim backspace issue quick fix

vim is one of the extraordinary editors that I’ve ever used. One of the best thing I enjoy is the total customization it offers from fonts to key bindings, backgrounds and a lot more.

Recently I’ve came across backspace not working on vim editor even after the backspace is set in ~/.vimrc.

When I first started using vim I’ve encountered this issue and the quick thing which fixed is the following line.

set backspace=2

you can find more description in the vim tips here.

Even after adding this I’ve found my colleagues facing the same issue. Then the quick fix was to add the following line in your .vimrc

set backspace=indent,eol,start
indent  allow backspacing over autoindent
eol     allow backspacing over line breaks (join lines)
start   allow backspacing over the start of insert; CTRL-W and CTRL-U
        stop once at the start of insert.

The above line has proved proper solution for many. But I’ve seen cases where even after having those lines backspace prints “^?”.

This was rather annoying to many. one other quick fix for this is as follows

stty erase ^?

Run the above command on the shell and try appending the above two lines in your ~/.vimrc as follows

set backspace=2

set backspace=indent,eol,start

Enjoy editing in vim. If you find any other better fix for this issue please leave a comment below. Thanks for reading this post.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: