1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-06 16:48:01 +00:00

Add Backspace Options as a vim til.

This commit is contained in:
jbranchaud
2016-01-19 23:03:17 -06:00
parent 543c2a6f81
commit 4d3f108cdf
2 changed files with 26 additions and 0 deletions

View File

@@ -289,6 +289,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
- [Add Custom Dictionary Words](vim/add-custom-dictionary-words.md)
- [Alternate Files With vim-rails](vim/alternate-files-with-vim-rails.md)
- [Amend Commits With Fugitive](vim/amend-commits-with-fugitive.md)
- [Backspace Options](vim/backspace-options.md)
- [Beginning And End Of Previous Change](vim/beginning-and-end-of-previous-change.md)
- [The Black Hole Register](vim/the-black-hole-register.md)
- [Breaking The Undo Sequence](vim/breaking-the-undo-sequence.md)

25
vim/backspace-options.md Normal file
View File

@@ -0,0 +1,25 @@
# Backspace Options
The `backspace` option determines the behavior of pressing the backspace key
(`<BS>`). By default, Vim's `backspace` option is set to an empty list.
There are three values that can be added that each independently alter the
behavior of the backspace key. These are `indent`, `eol`, and `start`.
When `indent` is included, you can backspace over indentation from
`autoindent`. Without it, Vim will not allow you to backspace over
indentation.
When `eol` is included, you can backspace over an end of line (eol)
character. If the cursor is at the first position of a line and you hit
backspace, it will essentially be joined with the line above it. Without
`eol`, this won't happen.
When `start` is included, you can backspace past the position where you
started Insert mode. Without `start`, you can enter Insert mode, type a bit,
and then when backspacing, only delete back as far as the start of Insert
mode.
The `backspace` default is absurd, you are going to want to add all of the
above to your Vim settings.
See `:h 'backspace'` for more details.