Skip to content

DaRealTrueBlue/CodeForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

CodeForge

CodeForge Logo

A Modern, Feature-Rich Code Editor Built with Python & Tkinter

Version Python License Platform GitHub

Download โ€ข Documentation โ€ข Contributing โ€ข Changelog


๐ŸŒŸ Features

Smart Editing

  • Auto-Indentation - Intelligent code block indentation
  • Auto-Complete Brackets - Automatically closes (), [], {}, <>
  • Bracket Matching - Visual highlighting of matching brackets
  • Current Line Highlight - Active line is subtly highlighted for better navigation
  • Smart Backspace - Removes matching bracket/quote pairs together
  • Wrap Selection - Select text and type a bracket/quote to wrap it

Advanced Commands

  • Toggle Comments - Ctrl+/ to comment/uncomment lines (Python, JS, Java, C, etc.)
  • Duplicate Line - Ctrl+D to duplicate current line or selection
  • Move Lines - Alt+Up/Down to move lines up or down
  • Multi-Cursor - Ctrl+Alt+Up/Down for basic multi-cursor support
  • Go to Line - Ctrl+G to quickly jump to a specific line number
  • Find & Replace - Enhanced with regex support, case-sensitive, and whole word options
  • Zoom Controls - Ctrl+= zoom in, Ctrl+- zoom out, Ctrl+0 reset zoom
  • Settings Dialog - Ctrl+, to configure editor preferences

Syntax Highlighting

Support for multiple languages:

  • Python
  • JavaScript/TypeScript
  • Java
  • C/C++/C#
  • HTML
  • And more...

Productivity

  • Recent Files Menu - Quick access to recently opened files
  • Auto-Save - Automatically saves your work every 30 seconds
  • Minimap - Code overview with clickable navigation
  • Integrated Terminal - Built-in terminal for running commands
  • Multi-File Tabs - Work on multiple files simultaneously
  • File Explorer - Browse and open files from a folder tree

Modern UI

  • Dark Theme - Easy on the eyes with VS Code-inspired colour scheme
  • Custom Title Bar - Frameless window with custom controls
  • Line Numbers - Always visible with synchronized scrolling
  • Status Bar - Shows cursor position and file path
  • Auto-Hide Scrollbars - Clean interface that appears only when needed

๐Ÿ“ธ Screenshots

Dark Theme (Default)

CodeForge Dark Theme

Light Theme

CodeForge Light Theme

Monokai Theme

CodeForge Monokai Theme

Dracula Theme

CodeForge Dracula Theme


๐Ÿš€ Getting Started

Download Pre-Built Executable

Easiest option: Download the latest release from the versions page.

Run from Source

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Installation

  1. Clone the repository:
git clone https://github.com/YOUR-NAME/codeforge.git
cd codeforge
  1. Install dependencies:
pip install pillow
  1. Run CodeForge:
python code_editor.py

Building Executable (Windows)

To create a standalone executable:

  1. Install PyInstaller:
pip install pyinstaller
  1. Run the build script:
.\build.bat
  1. Find the executable in dist/CodeForge.exe

For more details, see build.spec for PyInstaller configuration.


โŒจ๏ธ Keyboard Shortcuts

File Operations

Shortcut Action
Ctrl+N New File
Ctrl+O Open File
Ctrl+S Save File
Ctrl+Shift+S Save As

Editing

Shortcut Action
Ctrl+Z Undo
Ctrl+Y Redo
Ctrl+X Cut
Ctrl+C Copy
Ctrl+V Paste
Ctrl+A Select All
Ctrl+F Find
Ctrl+H Find and Replace
Ctrl+/ Toggle Comment
Ctrl+D Duplicate Line
Ctrl+W Close Current Tab
Ctrl+G Go to Line
Ctrl+, Settings

Navigation

Shortcut Action
Alt+Up Move Line Up
Alt+Down Move Line Down
Ctrl+Alt+Up Add Cursor Above
Ctrl+Alt+Down Add Cursor Below

View

Shortcut Action
Ctrl+= or Ctrl++ Zoom In
Ctrl+- Zoom Out
Ctrl+0 Reset Zoom

Access through the View menu:

  • Toggle Terminal
  • Toggle Minimap

๐Ÿ› ๏ธ Technologies Used

  • Python - Core programming language
  • Tkinter - GUI framework
  • PIL/Pillow - Image processing for icons
  • PyInstaller - Executable creation

๐Ÿ“‹ Project Structure

codeforge/
โ”œโ”€โ”€ code_editor.py      # Main application file
โ”œโ”€โ”€ build.bat           # Windows build script
โ”œโ”€โ”€ build.spec          # PyInstaller configuration
โ”œโ”€โ”€ icon/               # Application icons
โ”‚   โ””โ”€โ”€ white-transparent.png
โ”œโ”€โ”€ build/              # Build artifacts
โ””โ”€โ”€ dist/               # Compiled executables

๐Ÿ”ง Configuration

CodeForge includes built-in configuration options:

  • Auto-Save: Enabled by default (30-second interval)
  • Theme: Dark theme (VS Code inspired)
  • Font: Consolas 11pt for code editing
  • Recent Files: Tracks last 10 opened files

๐Ÿค Contributing

We welcome contributions from the community! Whether it's:

  • ๐Ÿ› Bug reports
  • ๐Ÿ’ก Feature requests
  • ๐ŸŽจ New themes
  • ๐Ÿ“ Documentation improvements
  • ๐Ÿ”ง Code contributions

Please read our Contributing Guidelines to get started.

Quick Start for Contributors

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Make your changes (follow our code style)
  4. Test thoroughly
  5. Commit with clear messages (git commit -m 'Add: description')
  6. Push to your fork (git push origin feature/AmazingFeature)
  7. Open a Pull Request

See Contributing for detailed guidelines.


๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ› Known Issues

  • Ctrl+` terminal shortcut removed due to cross-platform compatibility issues (use View menu instead)
  • Multi-cursor is simplified (selects matching text rather than true multiple cursors)

๐Ÿ“ Changelog

Version 1.1.0-beta (Current - BETA RELEASE)

  • ๐ŸŽจ Complete UI Overhaul: Modern, fully customisable interface design
  • ๐ŸŽญ Theme System: 4 built-in themes (Dark, Light, Monokai, Dracula)
  • ๐Ÿ”ง Layout Customisation: Move sidebar left/right, customise panel positions
  • ๐Ÿ’พ Layout Profiles: Save and load custom layout configurations as JSON
  • ๐ŸŽจ Theme Switcher: Switch themes instantly from View menu
  • ๐Ÿ“ Resizable Panels: Smooth panel resizing with ttk.PanedWindow
  • ๐ŸŽฏ Accent Colours: Customisable accent colours for each theme
  • ๐Ÿ–ผ๏ธ Modern Colour Schemes: Professional themes with proper contrast
  • โš™๏ธ Extended Settings: New layout and theme preferences
  • ๐Ÿ”„ Layout Presets: Quick layout switching system
  • ๐Ÿ“‚ Import/Export: Share layouts via JSON files
  • โœจ All v1.0.6 Optimizations: Includes all performance improvements
  • โš ๏ธ BETA: This is a preview release - please report issues!

New Menu Items:

  • View โ†’ Themes (Dark, Light, Monokai, Dracula)
  • View โ†’ Layout (Sidebar position, Save/Load layouts)

New Features:

  • Instant theme preview without restart
  • Sidebar can be positioned left or right
  • Layout configurations saved to/loaded from JSON
  • All UI elements update dynamically with theme changes

Version 1.0.6

  • โšก Major performance optimizations:
    • Compiled regex pattern caching for 50% faster syntax highlighting
    • Buffered file I/O (8KB buffer) for faster file loading and saving
    • Optimized line number generation for large files
    • Status bar debouncing (50ms) for smoother cursor updates
    • Memory cleanup when closing files (garbage collection)
    • Improved undo/redo performance with better text widget configuration
    • Disabled undo tracking during file switches for instant loading
  • โœจ New Features:
    • Go to Line dialog (Ctrl+G)
    • Enhanced Find & Replace with regex, case-sensitive, and whole word options
    • Zoom controls (Ctrl+=, Ctrl+-, Ctrl+0)
    • Settings dialog (Ctrl+,) for font, tab size, and preferences
    • ANSI colour support in terminal for colourised output
  • ๐Ÿ› Bug Fixes:
    • Fixed zoom in keyboard shortcut (added Control-equal binding)
    • Fixed minimap rendering from barcode-like to clean 2-pixel lines
    • Fixed minimap scrolling and viewport synchronization
    • Browser cache-busting for version updates page
  • ๐Ÿ’… UI Improvements:
    • Complete minimap redesign with smooth 2-pixel height lines
    • Better visual feedback throughout the editor

๐Ÿ‘ค Author

DaRealTrueBlue


๐Ÿ™ Acknowledgments

  • Inspired by Visual Studio Code
  • Built with โค๏ธ using Python and Tkinter
  • Icon design and UI inspired by modern code editors

๐Ÿ“ฎ Contact & Support

Have questions or suggestions?


๐ŸŒŸ Show Your Support

If you find CodeForge useful, please:

  • โญ Star this repository
  • ๐Ÿฆ Share it with others
  • ๐Ÿค Contribute to the project
  • ๐Ÿ“ข Spread the word!

Made with โค๏ธ by the CodeForge team

โญ Star this repo if you find it useful!

About

A modern, customisable code editor inspired by Visual Studio Code

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks