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 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.

Metadata

Release files for codegment 1.0.2

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.2
File Size Uploaded
codegment-1.0.2.tar.gz 16.2 kB Details

Built distribution (wheel)

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

Total release size: 33.6 kB

Release files / codegment-1.0.2.tar.gz

Download URL codegment-1.0.2.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0e96b92a2965ae1e039048a85850b90450c98316e671b7d77b19d55617ca6410
BLAKE2b-256 checksum
How to use checksums
26cccdcc16e77b261dbcdaa2fddd06a5ba4a252a4aef8499e059a86e7c6ffc3a
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.2-py3-none-any.whl

Download URL codegment-1.0.2-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4f9d9b9758c3a452f1cbba262a07a2885fafc361e47e4ac8e0e25a551f08792
BLAKE2b-256 checksum
How to use checksums
5ad2f50600b745074af2b62f4d58a4dfe0d543ff3234e1f7e838d242e2e5c50d
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.2 This release

2 release files

1.0.1

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