I've spent a fair amount of time reading and playing with cinoptions,
which has solved some of my problems
My cinoptions are now "l1,(0,u0,j1"
The result, then, is
http://i.imgur.com/AYmcS.png
http://i.imgur.com/nqWuk.png
I haven't managed to find a solution for the nested {} list (matrix
format), nor do I know why the third case statement indents more than
the rest.
Does anyone know what statement I've misinterpreted? I've now read
the cinoptions help a number of times (and done my share of google
searches)
On Jan 7, 3:51 pm, chardson <[email protected]> wrote:
> Ah, I saw that but didn't look carefully enough. I'll try and post
> the solution when I figure it out
>
> Thanks much
>
> On Jan 7, 11:31 am, Ben Fritz <[email protected]> wrote:
>
> > On Jan 6, 1:27 am, chardson <[email protected]> wrote:
>
> > > Greetings all,
>
> > > I've been searching hard, but not finding terribly useful results for
> > > the following problem. The problem is this: most of my labmates use
> > > emacs and specific java formatting rules (simple in emacs). I need to
> > > duplicate said rules (and have succeeded for most), but I'm not sure
> > > how to automatically indent argument lists and nested bracket
> > > structures. Switch-case also screws up when brackets are involved.
>
> > > e.g. say I write
>
> > > ------------------------------------------------------
>
> > > double[][] gpsToMeters = {{1,2,3},
> > > {1,2,3},
> > > {1,2,3},
> > > {1,2,3}};
>
> > > ------------------------------------------------------
>
> > > or
>
> > > ------------------------------------------------------
>
> > > functionCallWithManyArguments(abc,
> > > def,
> > > ghi);
>
> > > ------------------------------------------------------
> > > (hopefully spaces indented sufficiently)
>
> > > I want the inner brackets to be vertically aligned, as well as the
> > > first character in the argument list.
>
> > For Java, C, C++, etc., the relevant option on Vim is 'cinoptions'
> > which controls the behavior of 'cindent'. 'cindent' is designed for C
> > code, but also used in Java, C++, and other similar languages. :help
> > 'cinoptions-values' and :help 'cinoptions' will allow you to find what
> > you need.
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php