General
PrimeEdit is a fast, native text editor for Linux built in C++17 with Qt. It combines the speed and simplicity of Notepad++ with modern features from VS Code — LSP integration, multi-cursor editing, Git integration, split-screen views — all in a ~7MB native binary that starts in under a second.
C++17, Qt 5/6, CMake. The binary is approximately ~7MB with no runtime dependencies beyond Qt.
Currently, PrimeEdit is Linux-only. The codebase uses Qt (cross-platform) and standard C++17, so a Windows or macOS port is technically feasible. However, a cross-platform release is not currently planned.
Yes. PrimeEdit is developed by Green Olive Tech LLC under an open source license.
PrimeEdit is native C++ (not Electron), so it starts faster and uses far less memory. It handles 1GB+ files that VS Code cannot open. VS Code has a larger extension ecosystem and built-in debugging. PrimeEdit is the better choice when you need raw editing speed, lightweight resource usage, and large file handling. VS Code is better when you need extensive language extensions, debugging, or remote development containers.
PrimeEdit was originally modeled on Notepad++ and shares many of the same editing features (tabbed interface, find/replace dialog, macros, bookmarks, code folding). PrimeEdit goes beyond Notepad++ with: LSP integration, multi-cursor editing, Git integration, split-screen views, remote file editing, 96 syntax languages loaded from JSON definitions, and a plugin system.
Editing
Ctrl+Z for undo, Ctrl+Y for redo. Undo history is unlimited within a session. Grouped operations (like find-and-replace-all) undo as a single action.
Hold Alt and drag with the mouse. A blue rectangle shows the selection. Type to insert text at every line. Use Alt+C to open the Column Editor dialog for text or number sequence insertion.
Place your cursor next to a bracket (( ) [ ] { }) and press Ctrl+B. Matching brackets are highlighted green; unmatched brackets are highlighted red.
Edit > Line Operations > Sort Lines (Ascending) or (Descending). You can also remove duplicate lines, remove empty lines, join lines, and trim whitespace from the same menu.
Yes. F9 starts recording, Shift+F9 stops, F10 plays back. You can run a macro N times or until end of file via Macro > Run Multiple Times. Macros can be saved and persist across restarts.
Ctrl+/ toggles single-line comments. For HTML/XML, it uses <!-- --> block comments automatically.
Multi-Cursor & Selection
Alt+Click to add cursors at any position. Ctrl+D to select the next occurrence of the current word. Ctrl+Shift+L to select all occurrences of the current word at once. Type to edit at all cursor positions simultaneously. Press Escape to return to a single cursor.
Ctrl+\ for a vertical split. Ctrl+Shift+\ for a horizontal split. F6 switches focus between panes. You can also clone a document to the other view — both views share the same content and edits sync in real time.
Yes. When you type an opening bracket, the closing bracket is automatically inserted at all cursor positions. This applies to parentheses, square brackets, curly braces, and quote characters.
Yes. All multi-cursor edits are atomic — one Ctrl+Z undoes the entire operation across all cursor positions.
Files & Encoding
No. PrimeEdit silently preserves all unsaved content — including untitled tabs. When you reopen PrimeEdit, everything reappears exactly as you left it. No save dialog. No prompt. This is the same behavior as Notepad++.
PrimeEdit uses a multi-stage approach: (1) BOM detection for UTF-8-BOM, UTF-16, UTF-32. (2) UTF-8 validation. (3) Byte-frequency heuristics for Windows-1252, ISO-8859-1, Shift-JIS. If ICU libraries are installed, additional encodings are supported (KOI8-R, GB2312, Big5, etc.).
Click the encoding indicator in the status bar (e.g., "UTF-8") to see conversion options. Similarly, click the EOL indicator (e.g., "LF") to convert between Unix (LF), Windows (CRLF), and Mac (CR). You can also use the Encoding menu.
PrimeEdit monitors open files using QFileSystemWatcher. When a change is detected, a yellow notification bar appears: "This file has been modified by another program. Reload?" Click Yes to reload or No to keep your version.
PrimeEdit is a text editor and will attempt to display binary files as text. For dedicated hex viewing, use the built-in hex viewer (if available) or an external tool.
Search & Replace
Ctrl+I opens the incremental search bar — matches are highlighted in real-time as you type. For more options, use Ctrl+F for the full dialog.
Yes. Ctrl+Shift+F opens Find in Files. Pick a directory, set file filters (e.g., *.cpp;*.h), and search. Results appear in the bottom panel, grouped by file.
Yes. In the search dialog, select the "Regular expression" radio button. Full regex syntax is supported, including backreferences in replace (\1, $1) and the "dot matches newline" option.
Extended mode recognizes escape sequences in your search text: \n (newline), \t (tab), \r (carriage return), \0 (null), \xNN (hex byte). Useful for searching for invisible characters.
Use the Mark tab in the search dialog (Ctrl+F then click "Mark"). Click "Mark All" to highlight every match with a yellow background. "Clear All Marks" removes the highlights.
Languages & LSP
96 languages have syntax highlighting definitions. Language is auto-detected from file extension, filename, shebang line, or content analysis.
Create a JSON file in resources/syntax/ with keywords, types, comment patterns, and string delimiters. Register it in resources/resources.qrc and add extension mappings in languagemanager.cpp. See the Technical Documentation for the full JSON schema.
Install the language server for your language (e.g., sudo apt install clangd for C++). PrimeEdit has built-in configurations for C++, Python, JavaScript/TypeScript, Rust, and Go. For other languages, create ~/.config/PrimeEdit/lsp-servers.json with the server command and arguments.
Check that: (1) the language server is installed and on your PATH, (2) the file has the correct extension so the language is detected, (3) the project has necessary configuration files (e.g., compile_commands.json for clangd). LSP features only activate for languages with configured servers.
Git & Remote
PrimeEdit shows colored gutter indicators: green for added lines, yellow for modified, red for deleted. These update automatically as you edit. The indicators appear in the left margin next to the line numbers.
Git > Commit (Ctrl+Shift+G) opens a commit dialog with file staging checkboxes, a diff preview for each file, and a commit message editor. Stage the files you want, write your message, and click Commit.
Git > Switch Branch shows a list of local branches. Select the branch you want to switch to. PrimeEdit will reload any open files that changed between branches.
File > Open Remote (Ctrl+Shift+O) opens the connection manager. Add SSH connections with hostname, username, and key file. Browse remote directories and open files. Changes are automatically uploaded on save.
Plugins
~/.config/PrimeEdit/plugins/ for user plugins, /usr/lib/prime-edit/plugins/ for system-wide plugins.
Tools > Plugins opens the plugin management dialog. Toggle the checkbox next to any plugin to enable or disable it. Changes take effect immediately — no restart required.
Create a Qt shared library (.so) implementing the PluginInterface. Plugins receive an EditorAPI object with access to the buffer, file operations, UI elements, and settings. See the Technical Documentation for the full plugin API reference.
Performance
PrimeEdit has been stress-tested with files up to 2.2GB (1GB of text, 20 million lines) using only 95MB of RAM. Files over 10MB use memory-mapped I/O with viewport loading. Files over 100MB use a sparse line index.
Files over 100MB open read-only by default to prevent accidental edits to very large files (which could be slow). This is a safety feature, not a limitation.
For normal files: ~50-150MB depending on file size and number of open tabs. For large files: memory is independent of file size thanks to memory-mapped I/O. A 1GB file uses ~95MB. A 500MB file uses ~108MB. The sparse line index keeps overhead minimal.
AI Features
Select text and press Ctrl+Shift+E to send it to an LLM. An inline diff view appears showing additions (green) and removals (red). Press A to accept the changes into your document, or Escape to discard them.
No, if you use Ollama (the default). Ollama runs locally on your machine. You can also configure any OpenAI-compatible endpoint if you prefer a cloud-based model.
Install Ollama from ollama.ai, then pull a model: ollama pull llama3. PrimeEdit connects to localhost:11434 by default. No additional configuration needed.
Verify that: (1) Ollama is running (ollama serve), (2) you have a model pulled (ollama list), (3) the endpoint URL in Tools > Configure Endpoint matches your Ollama address (default: http://localhost:11434/api/generate).
Configuration
~/.config/PrimeEdit/settings.json — all editor preferences, theme selection, file defaults.
~/.local/share/PrimeEdit/sessions/ — open tabs, cursor positions, bookmarks, fold state. Unsaved documents are cached in the unsaved/ subdirectory.
Open Settings > Preferences and click Reset to Defaults. Or delete ~/.config/PrimeEdit/settings.json and restart.
Troubleshooting
Try these steps:
- Run from terminal to see error messages:
./build/PrimeEdit - Delete settings:
rm ~/.config/PrimeEdit/settings.json - Delete session cache:
rm -rf ~/.local/share/PrimeEdit/sessions/ - Verify Qt is installed:
qmake6 --versionorqmake --version
PrimeEdit detects language from the file extension. If your file has an unusual extension, set the language manually via the Language menu. If the language isn't supported, you can create a JSON definition (see the Technical Documentation).
This was a known issue that has been fixed. PrimeEdit now uses QTextDocument::contentsChange instead of textChanged to distinguish real edits from formatting-only changes. If you still see this, please report it.
Theme changes should apply instantly. If they don't: (1) make sure you clicked Apply or OK in Preferences, (2) try restarting PrimeEdit, (3) delete ~/.config/PrimeEdit/settings.json and restart to reset to defaults.