NP2 is a lightweight, cross-platform text editor inspired by Notepad++, built with Python 3 and Tkinter. It aims to provide a familiar, fast, and capable editing experience without the bloat of Electron-based editors.
- Syntax Highlighting: Supports 50+ languages via Pygments.
- Tabbed Interface: Open multiple files simultaneously.
- Search & Replace: fast find and replace functionality.
- Line Numbers: standard features for coding.
- Autocomplete: basic text completion.
- Linting: integrated basic linting support.
- Cross-Platform: Runs on Windows, Linux, and macOS.
- Python 3.8+
- pip
-
Clone the repository:
git clone https://github.com/flatdotcodes/np2.git cd np2 -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
You can build a standalone executable using PyInstaller (also available as a pre-compiled binary under the releases tab):
pip install pyinstaller
pyinstaller --noconsole --onefile --name NP2 main.pyThe executable will be located in the dist/ folder.
main.py: Entry point.editor/: core editor components (text_editor.py,app.py,tab_manager.py).utils/: utility functions for file handling, language detection, etc.panels/: UI panels (search, terminal, workspace).linting/: linter integration logic.tests/: benchmark and unit tests.
This project is currently in active development.
- Working: Core editing, saving/loading, tabs, syntax highlighting, basic search.
- In Progress: Advanced code intelligence, plugin system.
- Known Issues: Large file performance (files > 1MB) involves a "Performance Mode" fallback.
MIT License
