Change 'backspace' default to "indent,eol,start" #2639

While here, alphabetically sort section 2 of vim_diff.txt

Helped-by: Jakob Schnitzer <mail@jakobschnitzer.de>
Helped-by: Felipe Morales <hel.sheep@gmail.com>
This commit is contained in:
Michael Reed
2015-05-12 19:49:24 -04:00
parent a822118e64
commit 6f72f56492
5 changed files with 11 additions and 9 deletions

View File

@@ -70,8 +70,8 @@ CTRL-A Insert previously inserted text.
*i_<Del>* *i_DEL* *i_<Del>* *i_DEL*
<Del> Delete the character under the cursor. If the cursor is at <Del> Delete the character under the cursor. If the cursor is at
the end of the line, and the 'backspace' option includes the end of the line, and the 'backspace' option includes
"eol", delete the <EOL>; the next line is appended after the "eol" (the default), delete the <EOL>; the next line is
current one. appended after the current one.
*i_CTRL-W* *i_CTRL-W*
CTRL-W Delete the word before the cursor (see |i_backspacing| about CTRL-W Delete the word before the cursor (see |i_backspacing| about
joining lines). See the section "word motions", joining lines). See the section "word motions",
@@ -319,9 +319,8 @@ The following keys are special. They stop the current insert, do something,
and then restart insertion. This means you can do something without getting and then restart insertion. This means you can do something without getting
out of Insert mode. This is very handy if you prefer to use the Insert mode out of Insert mode. This is very handy if you prefer to use the Insert mode
all the time, just like editors that don't have a separate Normal mode. You all the time, just like editors that don't have a separate Normal mode. You
may also want to set the 'backspace' option to "indent,eol,start" and set the may also want to set the 'insertmode' option. You can use CTRL-O if you want
'insertmode' option. You can use CTRL-O if you want to map a function key to to map a function key to a command.
a command.
The changes (inserted or deleted characters) before and after these keys can The changes (inserted or deleted characters) before and after these keys can
be undone separately. Only the last change can be redone and always behaves be undone separately. Only the last change can be redone and always behaves

View File

@@ -818,7 +818,7 @@ A jump table for the options with a short description can be found at |Q_op|.
done with ":syntax on". done with ":syntax on".
*'backspace'* *'bs'* *'backspace'* *'bs'*
'backspace' 'bs' string (default "") 'backspace' 'bs' string (default "indent,eol,start")
global global
Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
mode. This is a list of items, separated by commas. Each item allows mode. This is a list of items, separated by commas. Each item allows

View File

@@ -28,8 +28,10 @@ these differences.
============================================================================== ==============================================================================
2. Option defaults *nvim-option-defaults* 2. Option defaults *nvim-option-defaults*
- 'nocompatible' is always set - 'backspace' defaults to "indent,eol,start"
- 'encoding' defaults to "utf-8" - 'encoding' defaults to "utf-8"
- 'nocompatible' is always set
- 'ttyfast' is always set
============================================================================== ==============================================================================
3. Changed features *nvim-features-changed* 3. Changed features *nvim-features-changed*

View File

@@ -430,9 +430,9 @@ static vimoption_T
(char_u *)"light", (char_u *)"light",
(char_u *)0L (char_u *)0L
} SCRIPTID_INIT}, } SCRIPTID_INIT},
{"backspace", "bs", P_STRING|P_VI_DEF|P_VIM|P_COMMA|P_NODUP, {"backspace", "bs", P_STRING|P_VIM|P_COMMA|P_NODUP,
(char_u *)&p_bs, PV_NONE, (char_u *)&p_bs, PV_NONE,
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, {(char_u *)"", (char_u *)"indent,eol,start"} SCRIPTID_INIT},
{"backup", "bk", P_BOOL|P_VI_DEF|P_VIM, {"backup", "bk", P_BOOL|P_VI_DEF|P_VIM,
(char_u *)&p_bk, PV_NONE, (char_u *)&p_bk, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},

View File

@@ -22,6 +22,7 @@ Test for insert expansion
STARTTEST STARTTEST
:so small.vim :so small.vim
:se backspace=""
:se cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff& :se cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff&
:se cot= :se cot=
nO#include "Xtestfile" nO#include "Xtestfile"