Vim Tips Wiki
No edit summary
(Fix help link, comment cleanup, clarify tip wording)
Line 9: Line 9:
 
|text=
 
|text=
   
In insert mode, to erase previously entered characters, set the following option:
+
In insert mode, to allow the backspace key to erase previously entered characters, autoindent, and newlines, set the following option:
   
:set backspace=2
+
:set backspace=indent,eol,start
   
  +
Or:
By default, this option is empty. If this option is empty, in insert mode, you can not erase characters entered before this insert mode started. This is the standard Vi behavior.
 
   
 
:set backspace=2
To get more help on this, use
 
   
  +
By default this option is empty, not allowing you to backspace over characters that weren't entered during the current insert mode session, the automatically inserted indentation, or across line breaks. This is the standard vi behavior.
:help 'backspace'
 
  +
 
To get more help on this, use:
  +
  +
{{help|'backspace'}}
   
 
}}
 
}}
   
 
== Comments ==
 
== Comments ==
a convenient and oldly memorable abbreviation is
 
 
:set bs=2
 
 
jsuntheimer--AT--neo.rr.com, May 26, 2001 22:59
 
----
 
This is a good one that makes things work how you want. Good call.
 
 
frioux [~(a--AT----AT----AT--t)~] gmail (dot) com, April 26, 2006 14:33
 
----
 
 
<!-- parsed by vimtips.py in 0.519958 seconds-->
 
<!-- parsed by vimtips.py in 0.519958 seconds-->

Revision as of 16:15, 25 July 2007

Previous TipNext Tip

Tip: #17 - Erasing previously entered characters in insert mode

Created: February 24, 2001 18:04 Complexity: basic Author: Yegappan Version: 5.7 Karma: 94/41 Imported from: Tip#17

In insert mode, to allow the backspace key to erase previously entered characters, autoindent, and newlines, set the following option:

:set backspace=indent,eol,start

Or:

:set backspace=2

By default this option is empty, not allowing you to backspace over characters that weren't entered during the current insert mode session, the automatically inserted indentation, or across line breaks. This is the standard vi behavior.

To get more help on this, use:

:help 'backspace'

Comments