[Anjuta-list] Auto-indent vs Auto-format



I've been experimenting with Anjuta for a while now, and always seem to end up
back in emacs for a variety of reasons mostly to do with the editor component.
The rest of Anjuta seems great, so I thought I'd share this little irritation
and see if anyone else has some tips:


Using the default settings it seems that some code gets mangled if I
"auto-format it". As an example:

Original:      std::vector<SomeClass<int> > i;
Autoformatted: std::vector < SomeClass < int >>i;

Now, the fact that the "formatted" version is pretty ugly isn't my real concern
- it worries me more that the auto-formatter has taken some perfectly servicable
code and made it syntactically incorrect. For obvious reasons this code no
longer compiles.

Perhaps the use of double templating is an exceptionally hard case (I know
little about how formatters work), but what I'd really like is to be able to
"auto-indent" the code rather than auto-format it (much as can be done in emacs
using the command "indent-region"). This means that my choice of spacing for
functions, templates etc can be preserved whilst the indenting gets corrected.

Is this currently possible with Anjuta? If not would it be hard to do? Perhaps
the distinction between auto-indent and auto-format is just in the parameters of
the "indent" command, so maybe there is a case for having both (and if anyone
knows how to get "indent" to *only* change indentation, that would be a well
appreciated temporary fix)?

Any comments would be great. Thanks in advance

Ben


----------------------------------------------
This mail sent through http://www.ukonline.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]