How do I Change C / C++ Formatting style in AS7.0 ?

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Edit->Advanced->Format Document is built in to AS7.0

 

There must be a way to configure the style.   I am sure that I have done this in the past.

e.g. to put spaces around operators.

e.g. to use a consistent brace style

 

David.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


This perhaps:

 

 

but not sure about the option for spaces around operators?? Would that be a VassistX option perhaps?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


If it were a VassistX option I'm guessing it would have been here:

 

 

So I'm not sure if that feature is available?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The "Format Document" will indent blocks but that is about it.

And it does not always do that very well.

 

I normally turn VAssistX off.   The VassistX Editor Options do not seem to affect  Format Document whether on or off.

 

Of course I can use an external program but I am sure that AS7.0 is able to Format.

It is my fault for re-installing AS7.0

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Perhaps you saw it in Visual Studio instead.

 

This is from Visual Studio Express 2017.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I un-installed my AS7.0.1931 recently

Then re-installed a fresh version of AS7.0.1931

 

Perhaps my memory was wrong.    I am sure that it did more than indent

I thought that Edit->Advanced->Format Document was configurable.

 

The Arduino IDE has always been able to format code.   And you can configure the style by editing a conf file.

The current CodeVision IDE can format code.     And you can configure the style in the IDE.

Rowley IDE can format code.     And you can configure the style in the IDE.

 

Obviously most IDEs let you use an external Code Formatter tool e.g. INDENT

 

I suspect that AS7.0 is capable.    It is just a question of finding the conf file or IDE menu.

Personally,  I find the Arduino IDE nice to use (for the format feature) even though the editor is fairly limited.

 

David.

Last Edited: Thu. Sep 19, 2019 - 08:19 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
I suspect that AS7.0 is capable.    It is just a question of finding the conf file or IDE menu.
But what Nigel showed kind of tells the whole story. Like everything else in AS7 if you compare it to the VS2015 on which it is based most things are HEAVILY stripped back. The Options menu in VS has loads more options than that in AS so I think this is just one of the many things lost in translation.

 

PS I can't help noticing the many posts made here about "Visual Studio Code" ( https://code.visualstudio.com/ ) which can be configured for AVR development - I imagine it retains more of the features of "full" Visual Studio than AS7 does.

Last Edited: Thu. Sep 19, 2019 - 08:20 AM