On Fri, Sep 19, 2014 at 08:17:28AM +0400, Yury Gribov wrote:
> > I was talking about mbr's plugin here :-)
> 
> Ah, ok. Then I'll mention thinca's plugin as a secondary option with a 
> disclaimer then.

Why?  There are more plugins that also do the same thing, all more popular
(on vim.org at least), all less dangerous (well, many are probably just
as bad :-( ).

> > I was suggesting you could write it as
> > :set cino=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0
> > and you'd be independent of sw setting.
> > ...
> > And yeah sw=2 does make sense for editing GCC, if you are used to sw=2
> > that is.  The point is that the sw setting has nothing to do with what
> > your text will look like, only with what keys you press.
> 
> Depending on whether you treat shiftwidth as "amount of spaces that is 
> inserted when I press >" or "default indent for a particular class of 
> files". For example with shiftwidth=2 user could (un)indent block of C 
> code with < or > which seems to be useful.

Vim treats it as the former (it has no concept of the latter).  cindent
uses it too, for that "s" thing, but you do not have to use it here anyway
since our coding standard requires two spaces so we can just hardcode that
in cino; and in that case, a user can use any sw he wants / is used to.

Using "s" in cino is useful if you want the layout to change if you change
the shiftwidth.  But we don't.


Segher

Reply via email to