Skip to content

SuperMo0/geany-cpp-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Geany C++ Formatter

A simple walkthrough to set up a C++ formatter for the Geany editor using Artistic Style (AStyle).


Before Formatting After Formatting

Step 1: Install Artistic Style

  • Download and install Artistic Style from the official site:
    https://astyle.sourceforge.net/

  • Extract the downloaded archive and locate the astyle.exe file inside the folder.

  • Copy the full path to astyle.exe.
    make sure astyle.exe included at the end of the path


Step 2: Configure Geany

  1. Open Geany.

  2. Go to:
    EditFormatSend Selection To...Set Custom Command

  3. Click Add and enter the following command (replace path with your actual path):
    path --style=allman --indent=spaces=4


Step 3: Using the Formatter

  • Before formatting, select the entire file with Ctrl + A.

  • Use the custom formatter command from the Send Selection To menu.

  • You can assign a shortcut to your formatter command:
    For example, if the formatter is the first custom command, press Ctrl + 1 to run it quickly.

About

this is a simple walkthrough to set up a C++ formatter for Geany editor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published