Home Explore Blog CI



neovim

6th chunk of `runtime/doc/indent.txt`
759476a552efb05501a3b627a734897f2bbf4c2a82e292730000000100000fa2
	cino=c0			  cino=c0,C1 >
		  /********		    /********
		    text.		    text.
		  ********/		    ********/
<	      (Example uses ":set comments& comments-=s1:/* comments^=s0:/*")

							*cino-/*
	/N    Indent comment lines N characters extra.  (default 0).
		cino=			  cino=/4 >
		  a = b;		    a = b;
		  /* comment */			/* comment */
		  c = d;		    c = d;
<
							*cino-(*
	(N    When in unclosed parentheses, indent N characters from the line
	      with the unclosed parenthesis.  Add a 'shiftwidth' for every
	      extra unclosed parentheses.  When N is 0 or the unclosed
	      parenthesis is the first non-white character in its line, line
	      up with the next non-white character after the unclosed
	      parenthesis.  (default 'shiftwidth' * 2).

		cino=			  cino=(0 >
		  if (c1 && (c2 ||	    if (c1 && (c2 ||
			      c3))		       c3))
		      foo;			foo;
		  if (c1 &&		    if (c1 &&
			  (c2 || c3))		(c2 || c3))
		     {			       {
<
							*cino-u*
	uN    Same as (N, but for one nesting level deeper.
	      (default 'shiftwidth').

		cino=			  cino=u2 >
		  if (c123456789	    if (c123456789
			  && (c22345		    && (c22345
			      || c3))		      || c3))
<
							*cino-U*
	UN    When N is non-zero, do not ignore the indenting specified by
	      ( or u in case that the unclosed parenthesis is the first
	      non-white character in its line.  (default 0).

		cino= or cino=(s	  cino=(s,U1 >
		  c = c1 &&		    c = c1 &&
		      (				(
		       c2 ||			    c2 ||
		       c3			    c3
		      ) && c4;			) && c4;
<
							*cino-w*
	wN    When in unclosed parentheses and N is non-zero and either
	      using "(0" or "u0", respectively, or using "U0" and the unclosed
	      parenthesis is the first non-white character in its line, line
	      up with the character immediately after the unclosed parenthesis
	      rather than the first non-white character.  (default 0).

		cino=(0			  cino=(0,w1 >
		  if (   c1		    if (   c1
			 && (   c2		&& (   c2
				|| c3))		    || c3))
		      foo;			foo;
<
							*cino-W*
	WN    When in unclosed parentheses and N is non-zero and either
	      using "(0" or "u0", respectively and the unclosed parenthesis is
	      the last non-white character in its line and it is not the
	      closing parenthesis, indent the following line N characters
	      relative to the outer context (i.e. start of the line or the
	      next unclosed parenthesis).  (default: 0).

		cino=(0			   cino=(0,W4 >
		  a_long_line(		    a_long_line(
			      argument,		argument,
			      argument);	argument);
		  a_short_line(argument,    a_short_line(argument,
			       argument);		 argument);
<
							*cino-k*
	kN    When in unclosed parentheses which follow "if", "for" or
	      "while" and N is non-zero, overrides the behaviour defined by
	      "(N": causes the indent to be N characters relative to the outer
	      context (i.e. the line where "if", "for" or "while" is).  Has
	      no effect on deeper levels of nesting.  Affects flags like "wN"
	      only for the "if", "for" and "while" conditions.  If 0, defaults
	      to behaviour defined by the "(N" flag.  (default: 0).

		cino=(0			   cino=(0,ks >
		  if (condition1	    if (condition1
		      && condition2)		    && condition2)
		      action();			action();
		  function(argument1	    function(argument1
			   && argument2);	     && argument2);
<
							*cino-m*
	mN    When N is non-zero, line up a line starting with a closing
	      parenthesis with the first character of the line with the
	      matching opening parenthesis.  (default 0).

		cino=(s			  cino=(s,m1 >
		  c = c1 && (		    c = c1 && (
		      c2 ||			c2 ||
		      c3			c3
		      ) && c4;		    ) && c4;
		  if (			    if (
		      c1 && c2			c1 && c2
		     )			    )
		      foo;			foo;
<
							*cino-M*
	MN    When N is non-zero, line up a line starting with a closing
	      parenthesis with the first character of the previous line.
	      (default 0).

		cino=			  cino=M1 >
		  if (cond1 &&		    if

Title: Cinoptions for Parentheses, Conditional Statements and Alignment
Summary
This section details 'cinoptions' values for indenting based on parentheses, specifically focusing on unclosed parentheses and their effect on indentation. It includes options for nesting levels (uN, U), alignment relative to the parenthesis or the content after it (w, W), and conditional statements (k). It also explains options for aligning lines starting with closing parentheses (m, M).