Re: breakindent, take 2
On 5/29/07, Yakov Lerner <[EMAIL PROTECTED]> wrote: On 5/29/07, Nico Weber <[EMAIL PROTECTED]> wrote: > > What do you think? I prefer (c) from implementation, efficiency and > > intuitivity perspective. > > I agree. Strongly. Yes, I agree with (c) , too. I suggested once new type of options to vim that behaved both like boolean, and numeric. But Bram rejected this. It's a pity because this would make for lesser number of options. Actually, the options that would be three-way boolean, and string, and numeric would be even better. An afterthought. A string-typed 'breakindent' option could work, too. Empty value=off, 0=on, +n, -n. Another advantage of string option is that you can add additional flags to it later, without multiplying number of new options ( a-la 'compatible', 'viminfo', 'giooptions' bag-of-flags ). Bram is always reluctant to add new options, so this can be a consideration. Yakov
Re: breakindent, take 2
On 5/29/07, Nico Weber <[EMAIL PROTECTED]> wrote: > What do you think? I prefer (c) from implementation, efficiency and > intuitivity perspective. I agree. Strongly. Yes, I agree with (c) , too. I suggested once new type of options to vim that behaved both like boolean, and numeric. But Bram rejected this. It's a pity because this would make for lesser number of options. Actually, the options that would be three-way boolean, and string, and numeric would be even better. Yakov
Re: breakindent, take 2
Hi, What do you think? I prefer (c) from implementation, efficiency and intuitivity perspective. I agree. Strongly. Great patch, by the way :-) - Nico
Re: breakindent, take 2
Would there be any benefit from making it a string option that accepted numbers only, so there could be three styles? breakindent=nabsolute positioning or broken lines breakindent=+n broken lines have additional indentation breakindent=-n broken lines have reduced indentation I am a bit at loss now: (a) if I switch to breakindent being a number, how will it be turned off? As suggested, the actual breakindent is 0, positive/negative values would be possible for shifting the indent right/left. But there is no value to say: no breakindent, except for the suggestion (b) breakindent being string and parsing "0"' as no breakindent, "+0" (="-0") as keep the indentation, etc for +-1, ... . But it is non-intuitive to have +0==-0!=0 and I am not sure how to do that (e.g. what variable will keep that in? if string, it will be very slow, it would have to be parsed at every line being displayed (!) etc.). (c) Another option would be to have a numerical value 'breakindentextra' or 'breakindentshift' (or some different name) taking numerical (negative, 0, positive) that would do the extra indent, while keeping breakindent bool to turn that on/off. But that gives 3 variables (bri, brimin, briextra). (d) To save the variable, 'breakindentmin' could be used do disable breakindent (if 0, since that makes no sense) or enable it (if <0), while breakindentextra would be as sub (c). In this case, 'breakindentmin' would be probably renamed to breakindent. But it is not very intuitive. What do you think? I prefer (c) from implementation, efficiency and intuitivity perspective. Vaclav
Re: breakindent, take 2
On Mon, 28 May 2007 16:04:17 +0200, "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote: > With this change plus 'linebreak' on, it could be made to simulate "French" > paragrah style for text, where the first line of a paragraph starts maybe 1em > or so right of the left margin (but with no blank line, unlike "American" > paragraph style which uses flush-left alignment with a blank line between > paragraphs). That would be useful. Would there be any benefit from making it a string option that accepted numbers only, so there could be three styles? breakindent=nabsolute positioning or broken lines breakindent=+n broken lines have additional indentation breakindent=-n broken lines have reduced indentation -- Matthew Winn
Re: breakindent, take 2
It would be nice if I could specificy additional indent for continuation lines. You make indent for continuation line *EQUAL* to indent of the 1st screen line. I use showbreak for this. Wouldn't breakindent=2 just duplicate the funcitonality of ':set breakindent' and ':set showbreak=\ \ ' (except the higlighting color)? It would not be difficult to add, though. (And for negative breakindent, well, I would think this is rather typesetting issue; but it is true once breakindent is a number, that would be trivial enhancement). Vaclav