On 11/26/2010 03:37 PM, H Xu wrote:
Hello,

When I add "b1" to cinoptions, vim doesn't indent current line when I
type "break" by default. This is inappropriate, I think. So I
recommend to  change the default value of cinkeys by adding "0break".
What do you think?

Hong Xu
2010/11/26


Hello,

Sorry that it should be "=break" but not "0break". The attachment is a patch to change the default value.

Hong Xu
2010/11/26



diff -r b2789846ed39 runtime/doc/indent.txt
--- a/runtime/doc/indent.txt    Wed Nov 24 18:48:12 2010 +0100
+++ b/runtime/doc/indent.txt    Sat Nov 27 00:24:06 2010 +0800
@@ -60,20 +60,21 @@
 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#,!^F,o,O,e,=break" 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
-       ":"   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)
-       "o"   if you type a <CR> anywhere or use the "o" command (not in
-               insert mode!)
-       "O"   if you use the "O" command (not in insert mode!)
-       "e"   if you type the second 'e' for an "else" at the start of 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)
+       "o"       if you type a <CR> anywhere or use the "o" command (not in
+                   insert mode!)
+       "O"       if you use the "O" command (not in insert mode!)
+       "e"       if you type the second 'e' for an "else" at the start of a
+                   line
+       "=break"    if you type "break"

 Characters that can precede each key:                          *i_CTRL-F*
 !      When a '!' precedes the key, Vim will not insert the key but will
diff -r b2789846ed39 runtime/doc/options.txt
--- a/runtime/doc/options.txt   Wed Nov 24 18:48:12 2010 +0100
+++ b/runtime/doc/options.txt   Sat Nov 27 00:24:06 2010 +0800
@@ -1380,7 +1380,7 @@
        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#,!^F,o,O,e,=break")
                        local to buffer
                        {not in Vi}
                        {not available when compiled without the |+cindent|
diff -r b2789846ed39 src/option.c
--- a/src/option.c      Wed Nov 24 18:48:12 2010 +0100
+++ b/src/option.c      Sat Nov 27 00:24:06 2010 +0800
@@ -727,7 +727,8 @@
     {"cinkeys",          "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
 #ifdef FEAT_CINDENT
                            (char_u *)&p_cink, PV_CINK,
-                           {(char_u *)"0{,0},0),:,0#,!^F,o,O,e", (char_u *)0L}
+                           {(char_u *)"0{,0},0),:,0#,!^F,o,O,e,=break",
+                               (char_u *)0L}
 #else
                            (char_u *)NULL, PV_NONE,
                            {(char_u *)0L, (char_u *)0L}

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff -r b2789846ed39 runtime/doc/indent.txt
--- a/runtime/doc/indent.txt    Wed Nov 24 18:48:12 2010 +0100
+++ b/runtime/doc/indent.txt    Sat Nov 27 00:24:06 2010 +0800
@@ -60,20 +60,21 @@
 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#,!^F,o,O,e,=break" 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
-       ":"     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)
-       "o"     if you type a <CR> anywhere or use the "o" command (not in
-               insert mode!)
-       "O"     if you use the "O" command (not in insert mode!)
-       "e"     if you type the second 'e' for an "else" at the start of 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)
+       "o"         if you type a <CR> anywhere or use the "o" command (not in
+                   insert mode!)
+       "O"         if you use the "O" command (not in insert mode!)
+       "e"         if you type the second 'e' for an "else" at the start of a
+                   line
+       "=break"    if you type "break"
 
 Characters that can precede each key:                          *i_CTRL-F*
 !      When a '!' precedes the key, Vim will not insert the key but will
diff -r b2789846ed39 runtime/doc/options.txt
--- a/runtime/doc/options.txt   Wed Nov 24 18:48:12 2010 +0100
+++ b/runtime/doc/options.txt   Sat Nov 27 00:24:06 2010 +0800
@@ -1380,7 +1380,7 @@
        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#,!^F,o,O,e,=break")
                        local to buffer
                        {not in Vi}
                        {not available when compiled without the |+cindent|
diff -r b2789846ed39 src/option.c
--- a/src/option.c      Wed Nov 24 18:48:12 2010 +0100
+++ b/src/option.c      Sat Nov 27 00:24:06 2010 +0800
@@ -727,7 +727,8 @@
     {"cinkeys",            "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
 #ifdef FEAT_CINDENT
                            (char_u *)&p_cink, PV_CINK,
-                           {(char_u *)"0{,0},0),:,0#,!^F,o,O,e", (char_u *)0L}
+                           {(char_u *)"0{,0},0),:,0#,!^F,o,O,e,=break",
+                               (char_u *)0L}
 #else
                            (char_u *)NULL, PV_NONE,
                            {(char_u *)0L, (char_u *)0L}

Reply via email to