From 4d3f108cdf15b36ae7e8593daa01315370152d93 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Tue, 19 Jan 2016 23:03:17 -0600 Subject: [PATCH] Add Backspace Options as a vim til. --- README.md | 1 + vim/backspace-options.md | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 vim/backspace-options.md diff --git a/README.md b/README.md index bc1d6bc..0753ec3 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/vim/backspace-options.md b/vim/backspace-options.md new file mode 100644 index 0000000..2a4261e --- /dev/null +++ b/vim/backspace-options.md @@ -0,0 +1,25 @@ +# Backspace Options + +The `backspace` option determines the behavior of pressing the backspace key +(``). 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.