[vtkusers] cpp syntax indentation with vim

David E DeMarle dave.demarle at kitware.com
Fri Jan 30 09:23:07 EST 2009


Try this: http://www.itk.org/Wiki/VTK_FAQ#Vim_indentation
Those cinoptions might do what you are looking for.


On Thu, Jan 29, 2009 at 7:55 PM, Darren Weber
<darren.weber.lists at gmail.com> wrote:
> I'm using vim to work on a VTK class.  Is there an easy way to
> configure vim so it will do automatic, smart indentation according to
> the style guide for VTK coding?
>
> I've put this at the start of my .h and .cxx files:
> // -*- vim:fenc=utf-8:ft=cpp:et:sw=2:ts=2:sts=2
>
> This only helps with indentation, not style details to get:
>
> if (expression)
>  {
>  statements;
>  }
>
> Whatever it is that I have currently configured, it gives me this:
>
> if (expression)
> {
>  statements;
> }
>
> etc.
>
> Thanks, Darren
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



More information about the vtkusers mailing list