Jump to content
Sign in to follow this  
RobG

C/C++ Formatter

Recommended Posts

After spending more and more time with my LaunchPad and CCS, I started to miss one of the features I use daily in my Eclipse, code formatter. CCS does not come with a built-in one, but there are plug-ins available. The one I found is called Astyleand it works pretty well.

 

To install it:

Help -> Software Updates -> Find and Install... -> Search for new features... -> New Remote Site

Name can be Astyle, URL: http://astyleclipse.sourceforge.net/update

Finish, agree, install, restart, etc.

After restart:

Window -> Preferences... -> C/C++ -> Code Formatter -> Formatters -> Astyle Plugin, Apply and OK.

In Preferences -> Astyle, you can choose the actual style, kr in my opinion is the best.

To format, Ctrl-Shift-F

 

Enjoy nice code! ( doesn't mean bug free :) )

Share this post


Link to post
Share on other sites

Yup. It installed. Restarted CCS. Opened up my code. Messed with the formatting. Pressed CTRL-SHIFT-F. The screen blinked. Nothing happened with the text.

 

Oh well.

Share this post


Link to post
Share on other sites
Yup. It installed. Restarted CCS. Opened up my code. Messed with the formatting. Pressed CTRL-SHIFT-F. The screen blinked. Nothing happened with the text.

Did you set your preferences to use this new formatter?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...