2026-05-23 13:14:30 +02:00
2026-05-23 13:14:30 +02:00
2026-05-23 13:14:30 +02:00
2026-05-23 13:14:30 +02:00
2026-05-23 13:14:30 +02:00
2026-05-23 13:14:30 +02:00
2026-05-23 13:14:30 +02:00
2026-05-23 13:14:30 +02:00
2026-05-23 13:14:30 +02:00

BareCode

A modular code editor built with C++17, Qt6, and CMake.
Designed to compile cleanly on Linux and Windows.


Features (v1.0)

Feature Details
Project tree Left panel — shows only the selected project directory
Tabbed editor Open multiple files simultaneously; tabs are movable and closable
Syntax highlighting C / C++ (extensible via HighlighterFactory)
Line numbers Painted in a dedicated gutter
Auto-indent Preserves indentation level on Enter
Tab → spaces Configurable; jumps to next tab stop
Persistent settings Window geometry, font, tab size, last project (INI file)

Project Structure

BareCode/
├── CMakeLists.txt          # Top-level build
├── main.cpp
├── resources/
│   └── resources.qrc
└── src/
    ├── core/               # MainWindow, ProjectManager, Settings, IPlugin
    ├── editor/             # EditorPanel, EditorTab, CodeEditor, LineNumberArea
    ├── filetree/           # FileTreePanel
    └── highlighter/        # SyntaxHighlighter, CppHighlighter, HighlighterFactory

Each subdirectory compiles into its own static library, keeping modules independent.


Building

Prerequisites

  • CMake ≥ 3.16
  • Qt6 (Widgets module)
  • A C++17-capable compiler (GCC, Clang, MSVC)

Linux

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
./build/BareCode

Windows (Visual Studio)

cmake -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release
build\Release\BareCode.exe

Windows (MinGW)

cmake -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build build
build\BareCode.exe

Extending BareCode

Adding a new syntax highlighter

  1. Create a subclass of SyntaxHighlighter in src/highlighter/.
  2. Populate m_rules in the constructor (see CppHighlighter as a template).
  3. Register the file extension(s) in HighlighterFactory.cpp.

No other files need to change.

Adding a new panel / plugin

  1. Implement the IPlugin interface from src/core/IPlugin.h.
  2. Create a QWidget-derived class for the UI.
  3. Instantiate and wire it up in MainWindow.

Code Style

All code uses Allman brace style and C++17 throughout.

Description
Schlanker Code Editor für PHP, HTML, CSS usw.
Readme MIT 906 KiB
Languages
C++ 96.9%
CMake 3.1%