]> granicus.if.org Git - vim/commitdiff
patch 8.1.0858: 'indentkeys' and 'cinkeys' defaults are different v8.1.0858
authorBram Moolenaar <Bram@vim.org>
Thu, 31 Jan 2019 13:12:57 +0000 (14:12 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 31 Jan 2019 13:12:57 +0000 (14:12 +0100)
Problem:    'indentkeys' and 'cinkeys' defaults are different.
Solution:   Make them the same, update docs. (close #3882)

runtime/doc/indent.txt
runtime/doc/options.txt
src/option.c
src/version.c

index 2c12fe417e6da9a3d5392753bce78d96d50691c8..299d1ac6832b6dd67f59c0d1db2287d978653d67 100644 (file)
@@ -60,12 +60,13 @@ typing certain characters or commands in certain contexts.  Note that this not
 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)
index 128b34cba33d342598d8e5d7c590f58f9313560a..266749006f7b21f67984f3179d8000868518418e 100644 (file)
@@ -1564,7 +1564,7 @@ A jump table for the options with a short description can be found at |Q_op|.
        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 short description can be found at |Q_op|.
 
 
                                                *'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|
index dda5414e616a9c2cb11e981e37a31fc1c2d04530..abbbaa5873433596f1cfb6f24074816016d2e86f 100644 (file)
@@ -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}
index f7dd6642994fa89593b4ccf7429001741a8f0d32..9422f8426c260e26736b08b650a31f86caf960ab 100644 (file)
@@ -783,6 +783,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    858,
 /**/
     857,
 /**/