Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>format-astyleNew to Visual Studio Code? Get it now.
format-astyle

format-astyle

DIZOFT Team

|
10,903 installs
| (0) | Free
Format C/C++ files with astyle
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Format-AStyle

Format code with AStyle

Average time to resolve an issue Percentage of issues still open


Requirements

You need to install AStyle

Installation

Debian

If you on *.debian systems, try

sudo apt install astyle

But remember, in repository may have older version!

The best way - build app using cmake

Common way to build using cmake

mkdir build
cd build
cmake ..
make
sudo make install

Windows

  • Download source from sourceforge
  • Extract archive
  • Put bin/AStyle.exe into your bin path or add current folder path to your env PATH
  • In settings set where is astyle -> AStyle.exe (it means that you add folder bin into PATH and this contains program named AStyle.exe)
  • Put astylerc file with astyle options into %APPDATA%\astylerc

How to use

For format document you need to click CTRL+ALT+L combination (just like in IDEA Studio) in opened, and saved document in HDD.

For Mac CMD+ALT+L (i don't have a MacBook...)

Extension Settings

This extension contributes the following settings:

  • astyleFormat.show-message: Show message when formatting. By default is true
  • astyleFormat.astylerc: Where is file .astylerc. By default is null (it means that file .astylerc exist in your HOME folder)
  • astyleFormat.messageTimeout: Delay for hide message about formatting

Known Issues

  • All

    • Need to check for .astylerc file
    • If document not exists, format will not be proceed
    • Try find astylerc file into current project (in root dir)
  • Windows

    • Add set custom astylerc file
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft