changeset 15701:9cd11f6beb70 v8.1.0858

patch 8.1.0858: 'indentkeys' and 'cinkeys' defaults are different commit https://github.com/vim/vim/commit/ce655743ba5c56c00769e57e6a6608c0088211ab Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 31 14:12:57 2019 +0100 patch 8.1.0858: 'indentkeys' and 'cinkeys' defaults are different Problem: 'indentkeys' and 'cinkeys' defaults are different. Solution: Make them the same, update docs. (close https://github.com/vim/vim/issues/3882)
author Bram Moolenaar <Bram@vim.org>
date Thu, 31 Jan 2019 14:15:05 +0100
parents 1ac5c6fdb67c
children 1d5946ec85cd
files runtime/doc/indent.txt runtime/doc/options.txt src/option.c src/version.c
diffstat 4 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -60,12 +60,13 @@ typing certain characters or commands in
 only triggers C-indenting.  When 'indentexpr' is not empty 'indentkeys' is
 used instead.  The format of 'cinkeys' and 'indentkeys' is equal.
 
-The default is "0{,0},0),:,0#,!^F,o,O,e" which specifies that indenting occurs
-as follows:
+The default is "0{,0},0),0],:,0#,!^F,o,O,e" which specifies that indenting
+occurs as follows:
 
 	"0{"	if you type '{' as the first character in a line
 	"0}"	if you type '}' as the first character in a line
 	"0)"	if you type ')' as the first character in a line
+	"0]"	if you type ']' as the first character in a line
 	":"	if you type ':' after a label or case statement
 	"0#"	if you type '#' as the first character in a line
 	"!^F"	if you type CTRL-F (which is not inserted)
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1564,7 +1564,7 @@ A jump table for the options with a shor
 	NOTE: This option is reset when 'compatible' is set.
 
 							*'cinkeys'* *'cink'*
-'cinkeys' 'cink'	string	(default "0{,0},0),:,0#,!^F,o,O,e")
+'cinkeys' 'cink'	string	(default "0{,0},0),0],:,0#,!^F,o,O,e")
 			local to buffer
 			{not in Vi}
 			{not available when compiled without the |+cindent|
@@ -4607,7 +4607,7 @@ A jump table for the options with a shor
 
 
 						*'indentkeys'* *'indk'*
-'indentkeys' 'indk'	string	(default "0{,0},:,0#,!^F,o,O,e")
+'indentkeys' 'indk'	string	(default "0{,0},0),0],:,0#,!^F,o,O,e")
 			local to buffer
 			{not in Vi}
 			{not available when compiled without the |+cindent|
--- a/src/option.c
+++ b/src/option.c
@@ -483,6 +483,9 @@ struct vimoption
 # define DEFAULT_PYTHON_VER	0
 #endif
 
+// used for 'cinkeys' and 'indentkeys'
+#define INDENTKEYS_DEFAULT (char_u *)"0{,0},0),0],:,0#,!^F,o,O,e"
+
 /*
  * options[] is initialized here.
  * The order of the options MUST be alphabetic for ":set all" and findoption().
@@ -757,7 +760,7 @@ static struct vimoption options[] =
     {"cinkeys",	    "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
 #ifdef FEAT_CINDENT
 			    (char_u *)&p_cink, PV_CINK,
-			    {(char_u *)"0{,0},0),:,0#,!^F,o,O,e", (char_u *)0L}
+			    {INDENTKEYS_DEFAULT, (char_u *)0L}
 #else
 			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)0L, (char_u *)0L}
@@ -1570,7 +1573,7 @@ static struct vimoption options[] =
     {"indentkeys", "indk",  P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
 #if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
 			    (char_u *)&p_indk, PV_INDK,
-			    {(char_u *)"0{,0},:,0#,!^F,o,O,e", (char_u *)0L}
+			    {INDENTKEYS_DEFAULT, (char_u *)0L}
 #else
 			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)0L, (char_u *)0L}
--- a/src/version.c
+++ b/src/version.c
@@ -784,6 +784,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    858,
+/**/
     857,
 /**/
     856,