Skip to main content

Codegment

A lightweight, modern desktop code editor featuring syntax highlighting, multi-file tab management, and intelligent suggestions, built with Python, Kivy, and Pygments.

PyPI Version PyPI Total Downloads PyPI Monthly Downloads Python Versions License

Codegment Screenshot


Overview

Codegment provides a clean, responsive development environment designed for programmers who need a fast, extensible code editor with visual elegance. Leveraging the rendering performance of Kivy, Material Design components from KivyMD, and the tokenization capabilities of Pygments, Codegment delivers an agile editing workflow with cross-platform desktop support.

Core Capabilities

  • Syntax Highlighting: Comprehensive token highlighting powered by Pygments, supporting dozens of programming languages and color schemes, including built-in support for Kivy language (.kv) files.
  • Code Completion: Contextual word suggestions and auto-completion dialogs for rapid coding.
  • Search and Replace: In-editor search functionality with navigation across occurrences and direct replacement tools.
  • Multi-Tab Editing: Open, edit, and switch between multiple documents simultaneously.
  • Dynamic Typography: In-place font scaling to adjust editor text dimensions seamlessly.
  • Configuration Persistence: User preferences and editor settings are stored in an INI configuration file.
  • Real-Time Coordinates: Bottom status bar tracks cursor row and column positions alongside the active lexer.

Installation

Install the latest release using pip:

pip install codegment

Or with Poetry:

poetry add codegment

From Source

Clone the repository and install dependencies:

git clone https://github.com/ndenissov/codegments.git
cd codegments
poetry install

On NixOS

A shell.nix configuration is provided with all necessary graphic and system libraries (OpenGL, SDL2, Tkinter, X11) preconfigured for Kivy:

# Using nix-shell:
nix-shell
poetry install
poetry run codegment

# Or using direnv:
direnv allow
poetry install
poetry run codegment

Quick Start

Launch Codegment directly from your terminal:

codegment

Alternatively, run the module through Python:

python -m codegment

Editor Shortcuts

Shortcut Action
Ctrl + N Create a new document
Ctrl + O Open file selector dialog
Ctrl + S Save current file
Ctrl + W Close active tab
Ctrl + F Open search dialog
F3 Next search match
Shift + F3 Previous search match
Ctrl + F3 Replace current match
Ctrl + = Increase font size
Ctrl + - Decrease font size
Ctrl + Space Trigger completion suggestions
Tab / Shift + Tab Cycle forward / backward through suggestions
Escape Dismiss suggestion list

Architecture and Dependencies

Codegment is built upon the following technologies:

  • Python 3.10+
  • Kivy: Hardware-accelerated UI framework
  • KivyMD: Material Design UI component library
  • Pygments: Syntax highlighting engine

Author

Nikita Denissov (@ndenissov)

License

This project is licensed under the GNU Lesser General Public License v2.1 or later. See the LICENSE file for details.

Release files for codegment 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codegment 1.0.1
File Size Uploaded
codegment-1.0.1.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codegment 1.0.1
File Interpreter ABI Platform
codegment-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.7 kB

Release files / codegment-1.0.1.tar.gz

Download URL codegment-1.0.1.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
16f3b8b42489f01d44bebdc316f86f102afe0f9fb36a2f339ef446bac02ff65c
BLAKE2b-256 checksum
How to use checksums
32efa510eb16a0372b98e7dcd784b9ff563a8ee8c07e190e42406d1d64ba5b05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.13.15 Linux/7.2.6-zen2

Release files / codegment-1.0.1-py3-none-any.whl

Download URL codegment-1.0.1-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38ff6dc60be63c2cfbe365847f2de90c57effb6f1329160a8b2a4560a8c5b4a7
BLAKE2b-256 checksum
How to use checksums
75f4ec80faad03b834dec0d4290765d708210fdacb900d993a37ef457ce59873
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.13.15 Linux/7.2.6-zen2

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page