I'm getting different formatting results when auto-indenting
than when I use the = command.  Basically:

In order to be sure that there isn't some side effect from some
of my other configuration stuff, I invoke vim with:
   vim -N -u NONE -U NONE toto.cc

Following that, I enter the following commands:
   :set sw=4
   :set cinoptions=(0U0
   :set cindent

I then enter input mode, and enter:

   Foo::Foo( int i, double d )
   :   i( i )
   ,   d( ::func( d
   )
   )
   {
   }

What appears on the screen (and in the file) is what I want:

   Foo::Foo( int i, double d )
       :   i( i )
       ,   d( ::func( d
                    )
            )
   {
   }

Now, however, I select the entire code (using V), and enter =,
to reformat the function.  I then get:

       Foo::Foo( int i, double d )
   :   i( i )
       ,   d( ::func( d
                    )
            )
   {
   }

For some reason, the first line is indented, and the second
isn't.  Where as I would expect that both forms of indenting
would give the same results.

Any ideas what I'm doing wrong?

(FWIW: I'm using vim 6.4, compiled with just about all of the
available options, on a Sun Sparc under Solaris 2.8.  I've
compiled it with the X11-Motif GUI, but the above behavior is
observable even in non-GUI mode.)

--
James Kanze (GABI Software)             email:[EMAIL PROTECTED]
Conseils en informatique orientée objet/
                  Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Reply via email to