Author Topic: C/C++ formatting difficulties  (Read 3782 times)

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
C/C++ formatting difficulties
« on: March 16, 2008, 07:53:17 AM »
Using 12.0.3.

I work in a wide variety of code bases.  They all fall into three basic buckets of formatting rules.  So far I can only get Slick to properly deal with the one that uses Style 2 with tabs('+4').  I (or rather the codebases I work in) disagree on a number of details about how Slick chooses to format Style 3.

What should I do?  Should I start rewriting the formatting logic?  If that's the recommendation, I'd appreciate tips if there are ways to do it that minimize pain during upgrades (for example, are there certain functions I should try to hook/replace, or should I modify the stock macros directly, or should I entirely replace Slick's built in formatting with my own, or are there other tips).  Is the formatting support broadening significantly in 13, enough that I should wait for 13 before investing the time?  Other suggestions?

@SlickTeam, are you guys interested in me posting about 40-60 lines of sample code illustrating the formatting styles that I'm trying to support?
« Last Edit: March 16, 2008, 08:53:20 AM by chrisant »

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: C/C++ formatting difficulties
« Reply #1 on: March 17, 2008, 02:23:27 PM »
Samples are always helpful.  It's also helpful to know if you are having trouble specifically with the beautifier or with indent on enter or dynamic surround or just with how statement templates are expanded.

Style 3 is the 3rd most popular style supported by SlickEdit, but surprisingly, we don't get much feedback about it, so your examples and suggestions would probably be very useful.