Mercurial > vim
comparison runtime/doc/indent.txt @ 3454:214c7ec1c8f9 v7.3.492
updated for version 7.3.492
Problem: Can't indent conditions separately from function arguments.
Solution: Add the 'k' flag in 'cino. (Lech Lorens)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 05 Apr 2012 17:17:42 +0200 |
parents | 3502a7f991fc |
children | 04592728474a |
comparison
equal
deleted
inserted
replaced
3453:f2ce0c2b95b7 | 3454:214c7ec1c8f9 |
---|---|
458 argument, argument, | 458 argument, argument, |
459 argument); argument); | 459 argument); argument); |
460 a_short_line(argument, a_short_line(argument, | 460 a_short_line(argument, a_short_line(argument, |
461 argument); argument); | 461 argument); argument); |
462 < | 462 < |
463 *cino-k* | |
464 kN When in unclosed parentheses which follow "if", "for" or | |
465 "while" and N is non-zero, overrides the behaviour defined by | |
466 "(N": causes the indent to be N characters relative to the outer | |
467 context (i.e. the line where "if", "for" or "while" is). Has | |
468 no effect on deeper levels of nesting. Affects flags like "wN" | |
469 only for the "if", "for" and "while" conditions. If 0, defaults | |
470 to behaviour defined by the "(N" flag. (default: 0). | |
471 | |
472 cino=(0 cino=(0,ks > | |
473 if (condition1 if (condition1 | |
474 && condition2) && condition2) | |
475 action(); action(); | |
476 function(argument1 function(argument1 | |
477 && argument2); && argument2); | |
478 < | |
463 *cino-m* | 479 *cino-m* |
464 mN When N is non-zero, line up a line starting with a closing | 480 mN When N is non-zero, line up a line starting with a closing |
465 parentheses with the first character of the line with the | 481 parentheses with the first character of the line with the |
466 matching opening parentheses. (default 0). | 482 matching opening parentheses. (default 0). |
467 | 483 |
528 value you will want to change. | 544 value you will want to change. |
529 (default 70 lines). | 545 (default 70 lines). |
530 | 546 |
531 *cino-#* | 547 *cino-#* |
532 #N When N is non-zero recognize shell/Perl comments, starting with | 548 #N When N is non-zero recognize shell/Perl comments, starting with |
533 '#'. Default N is zero: don't recognizes '#' comments. Note | 549 '#'. Default N is zero: don't recognize '#' comments. Note |
534 that lines starting with # will still be seen as preprocessor | 550 that lines starting with # will still be seen as preprocessor |
535 lines. | 551 lines. |
536 | 552 |
537 | 553 |
538 The defaults, spelled out in full, are: | 554 The defaults, spelled out in full, are: |
539 cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s, | 555 cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s, |
540 c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0 | 556 c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0 |
541 | 557 |
542 Vim puts a line in column 1 if: | 558 Vim puts a line in column 1 if: |
543 - It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'. | 559 - It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'. |
544 - It starts with a label (a keyword followed by ':', other than "case" and | 560 - It starts with a label (a keyword followed by ':', other than "case" and |
545 "default") and 'cinoptions' does not contain an 'L' entry with a positive | 561 "default") and 'cinoptions' does not contain an 'L' entry with a positive |