Reputation: 91
When I first started, I cannot use backspace to delete chars just like in windows. Then I found a solution that to modify the config file (/etc/vim/vimrc
& vimrc.tiny
).
This solution enables me to use the backspace to delete the chars I typed in the current file. But I still can not delete the original chars. (Original chars means the content that already exists in the file before I open it.)
E.g., there is file named 1.txt, its content:
abc
Then I open it, typing in three new chars: def
, the content in this file is:
abcdef
When I use backspace to delete these chars.
I can delete def
, but when the cursor comes to the char c
, or b
, or a
.
It just does not work.
Any help from you will be highly appreciated.
Upvotes: 0
Views: 206
Reputation: 45087
You need to set the 'backspace'
option. Put the following in your ~/.vimrc
:
set backspace=indent,eol,start
You also should also be using ~/.vimrc
instead of /etc/vim/vimrc
.
Please take a look at the following:
:h 'backspace'
:h vimrc-intro
:h vimrc_example.vim
Upvotes: 3