David Pineau wrote:

> While configuring my indentation, I came across a behaviour that seemed
> unintuitive to me (I did not manage to find anything related to this on the
> mailling lists, sorry if I missed it).
> 
> When a value in the cinoptions string is described as a shiftwidth value,
> the value cannot be zero.
> This means that if I write "cino=n0s", the indentation behaves as if I
> wrote "cino=n1s".
> 
> Reading the code (in the latest vim mercurial trunk), I found that if the
> value and the fraction were equal to 0 when the 's' character is present,
> then the value is set to 1 by default. I am aware that writing "n0s"
> instead of "n0" may be a stretch, but I found this behaviour disturbing.
> 
> Is this behaviour intended, or is it a unlucky side-effect of the default 1
> shiftwidth width when only the s is present ?
> 
> In the second case, I wrote a little patch that should be easy to apply and
> check (Patch retrieved from a mercurial patch queue), that I will join to
> my next message if you deem it useful :)

Why would anyone use "0s"?  You can just use "0".

I do agree it's counter intuitive.

-- 
How To Keep A Healthy Level Of Insanity:
11. Specify that your drive-through order is "to go".

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
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

Raspunde prin e-mail lui