Lucy Archive

Arduino Environment Setup #2. Arduino IDE Dark Theme, Font, Tab Spacing Settings +a (Useful Environment Settings)

Created: 2024-06-11

Created: 2024-06-11 01:22

Recommended Arduino IDE Settings

Summary

The default Arduino IDE has the advantage of being compact, but it lacks readability, leading to decreased productivity. Even with slightly complex code, it becomes difficult to use. This post provides instructions for setting up the Arduino IDE to enhance programming productivity. Please note that these settings are based on personal preferences and are for reference only. They are not mandatory.

Setting Contents

  • Add Line Numbers
  • Show Detailed Output During Compilation
  • Apply Dark Theme
  • Change Font
  • Change Font Size
  • Change Indentation Tab Spacing
  • Change Initial Editor Window Size When IDE Starts

Applying Settings

Add Line Numbers

  • Settings: Menu Bar > File > Preferences: Check the Show line numbers box in the Settings tab.
Arduino IDE Line Number Display Setting

Arduino IDE Line Number Display Setting


Comparison Before/After Line Number Setting

Arduino IDE Line Number

Arduino IDE Line Number

Show Detailed Output During Compilation

As the code becomes more complex, it can be difficult to determine where an error occurred during compilation. By clicking "Show verbose output during compilation", it is easier to check at which point the error occurred.

  • Settings: Menu Bar > File > Preferences: Select Compilation from the "Verbose output during:" options.
Arduino Compile Detailed Output Display Setting

Arduino Compile Detailed Output Display Setting

Dark Theme Settings

1. Dark Theme Download Path - Click
2. Download the theme file from the Dark Theme download path.

Arduino Environment Setup #2. Arduino IDE Dark Theme, Font, Tab Spacing Settings +a (Useful Environment Settings)

3. Extract the downloaded file: The 'theme' folder is the folder that will be moved to the Arduino installation file folder.

Arduino Environment Setup #2. Arduino IDE Dark Theme, Font, Tab Spacing Settings +a (Useful Environment Settings)



4. Navigate to the lib folder within the Arduino installation folder. In my case, the path is C:\Program Files (x86)\Arduino\lib.
5. Rename the existing theme folder within the lib folder to theme(old).

Arduino Environment Setup #2. Arduino IDE Dark Theme, Font, Tab Spacing Settings +a (Useful Environment Settings)


6. Move the theme folder downloaded from Github to the lib folder mentioned above.

Arduino Environment Setup #2. Arduino IDE Dark Theme, Font, Tab Spacing Settings +a (Useful Environment Settings)


7. Within the syntax folder of the copied theme folder, rename the files as shown in the image below.
1. Rename default.xml to default_old.xml
2. Rename dark.xml to default.xml

Arduino Environment Setup #2. Arduino IDE Dark Theme, Font, Tab Spacing Settings +a (Useful Environment Settings)


8. When you run the Arduino IDE, you will see the Dark Theme applied as shown below.

Arduino IDE Dark Theme

Arduino IDE Dark Theme

Other Settings: Font, Tab Spacing, Editor Window Size

We will set the following detailed settings.

  • Font Type: D2Coding (Chosen for its good Korean readability)
  • Font Size: 16
  • Tab Size: 4
  • Initial Editor Window Size: 900 x 900 px

Before performing the following settings, close the Arduino program and install the font you want to use before proceeding.

  • Navigate to the Arduino account settings file: C:\Users\{Username}\AppData\Local\Arduino15\preferences.txt
  • Open the file and modify the following content.
    • Line 20: Change editor.font=Monospaced,plain,14 to editor.font=D2Coding,plain,16
    • Line 30: Change editor.tabs.size=2 to editor.tabs.size=4
    • Line 32: Change editor.window.height.default=600 to editor.window.height.default=900
    • Line 34: Change editor.window.width.default=500 to editor.window.width.default=900

Final Result Comparison

Arduino Environment Settings Change Before and After Comparison

Environment Settings Change Before and After Comparison


Thank you for reading until the end. ๐Ÿ˜Š


Footnotes

1. D2Coding font download: https://github.com/naver/d2codingfont

Comments0