Getting Started
Installation
PrimeEdit requires Qt 6 (or Qt 5) development libraries and CMake.
# Ubuntu / Debian
sudo apt install qt6-base-dev qt6-tools-dev qt6-svg-dev cmake build-essential
# Fedora
sudo dnf install qt6-qtbase-devel qt6-qtsvg-devel cmake gcc-c++
# Arch Linux
sudo pacman -S qt6-base qt6-svg cmake base-devel
Build & Run
git clone https://github.com/MANZOORAHMED611/prime_edit.git prime-edit
cd prime-edit
mkdir build && cd build
cmake ..
make -j$(nproc)
./PrimeEdit
~/.local/share/. You can find it in your application menu by searching "PrimeEdit".
First Launch
When you open PrimeEdit for the first time:
- The editor opens with the Notepad++ theme (white background, blue keywords)
- An empty Untitled 1 tab is ready for typing
- The toolbar shows common actions as 16x16 icons in a single row
- The status bar at the bottom shows line/column, encoding, and line ending
Interface Overview
| Area | Location | Purpose |
|---|---|---|
| Menu Bar | Top | 12 menus: File, Edit, Search, View, Encoding, Language, Settings, Tools, Macro, Run, Plugins, Window, ? |
| Toolbar | Below menu | Quick access to common actions (file, edit, search, view, macro) |
| Tab Bar | Below toolbar | Switch between open documents. Colored icons by file type. |
| Gutter | Left of editor | Bookmark margin, line numbers, fold margin, Git indicators |
| Editor | Center | Main editing area with syntax highlighting |
| Status Bar | Bottom | Ln/Col/Sel/Pos, Length/Lines, EOL (clickable), Encoding (clickable), INS/OVR |
Basic Editing
- New file: Ctrl+N or double-click empty tab bar area
- Open file: Ctrl+O — or drag files from your file manager
- Save: Ctrl+S — prompts for untitled files
- Close tab: Ctrl+W, click the X, or middle-click the tab
- Switch tabs: Ctrl+PgUp / Ctrl+PgDn
Keyboard Shortcuts
File Operations
| Action | Shortcut |
|---|---|
| New file | Ctrl+N |
| Open file | Ctrl+O |
| Open remote file | Ctrl+Shift+O |
| Save | Ctrl+S |
| Save As | Ctrl+Alt+S |
| Reload from Disk | Ctrl+Shift+R |
| Close tab | Ctrl+W |
| Print Preview | Ctrl+P |
Editing
| Action | Shortcut |
|---|---|
| Undo / Redo | Ctrl+Z / Ctrl+Y |
| Cut / Copy / Paste | Ctrl+X / C / V |
| Select All | Ctrl+A |
| Duplicate Line | Ctrl+Shift+D |
| Delete Line | Ctrl+Shift+K |
| Move Line Up / Down | Alt+Up / Alt+Down |
| Toggle Comment | Ctrl+/ |
| Go to Line | Ctrl+G |
| Jump to Bracket | Ctrl+B |
| Zoom In / Out / Reset | Ctrl++ / - / 0 |
Multi-Cursor & Selection
| Action | Shortcut |
|---|---|
| Add cursor | Alt+Click |
| Select next occurrence | Ctrl+D |
| Select all occurrences | Ctrl+Shift+L |
| Column (rectangular) selection | Alt+Drag |
| Column Editor | Alt+C |
Split-Screen
| Action | Shortcut |
|---|---|
| Split vertical | Ctrl+\ |
| Split horizontal | Ctrl+Shift+\ |
| Switch focus between panes | F6 |
| Close split | Ctrl+Alt+\ |
Search
| Action | Shortcut |
|---|---|
| Incremental search | Ctrl+I |
| Find dialog | Ctrl+F |
| Replace dialog | Ctrl+H |
| Find in Files | Ctrl+Shift+F |
Code Intelligence
| Action | Shortcut |
|---|---|
| Trigger auto-complete | Ctrl+Space |
| Hover documentation | Ctrl+K |
| Go to definition | F12 or Ctrl+Click |
| Find references | Shift+F12 |
| Rename symbol | F2 |
| Expand snippet | Tab |
Git & Remote
| Action | Shortcut |
|---|---|
| Git commit | Ctrl+Shift+G |
| Open remote file | Ctrl+Shift+O |
Macros & Tools
| Action | Shortcut |
|---|---|
| Start recording macro | F9 |
| Stop recording macro | Shift+F9 |
| Play macro | F10 |
| Toggle bookmark | Ctrl+F2 or click bookmark margin |
| Next bookmark | Ctrl+Shift+F2 |
| Previous bookmark | Ctrl+Alt+F2 |
| Toggle terminal | Ctrl+' |
| Block evaluation (AI) | Ctrl+Shift+E |
| Command Palette | Ctrl+Shift+P |
| Distraction-Free Mode | Ctrl+Shift+F11 |
| Next Tab | Ctrl+PageDown |
| Previous Tab | Ctrl+PageUp |
Multi-Cursor Editing
Multi-cursor editing lets you type, delete, and paste at multiple positions simultaneously.
Adding Cursors
- Alt+Click anywhere in the document to place an additional cursor
- Ctrl+D selects the next occurrence of the current word and adds a cursor there
- Ctrl+Shift+L selects all occurrences of the current word at once
- Press Escape to return to a single cursor
What Works with Multi-Cursor
- Typing, deleting, and pasting text
- Auto-close brackets and quotes (inserted at all cursor positions)
- Line operations (duplicate, delete, move)
- Toggle comments
Column Selection
Hold Alt and drag with the mouse to create a rectangular (column) selection. Type to insert text at every line. Use Alt+C to open the Column Editor dialog for text or number sequence insertion.
Split-Screen
View two files side by side, or two different parts of the same file.
Splitting
- Ctrl+\ splits the editor vertically (side by side)
- Ctrl+Shift+\ splits horizontally (top and bottom)
- F6 switches focus between panes
- Ctrl+Alt+\ closes the current split
Cloning a Document
Right-click a tab and select Clone to Other View. Both views share the same document — edits in one pane appear instantly in the other. This is useful for editing one part of a file while referencing another part.
Moving Tabs
Drag a tab from one pane to the other, or right-click and select Move to Other View.
Search & Replace
Quick Search
Ctrl+I opens the incremental search bar — a compact bar that highlights matches as you type. Press Enter for next match, Shift+Enter for previous, Escape to close.
Full Search Dialog
Ctrl+F opens the tabbed search dialog with four tabs:
- Find — Find Next, Count, Find All in Current Document, Find All in All Open Documents
- Replace (Ctrl+H) — Replace one, Replace All, Replace in All Open Documents
- Find in Files (Ctrl+Shift+F) — Search across files on disk with directory picker and filters
- Mark — Highlight all matches with yellow background. Optionally bookmark marked lines.
Search Modes
- Normal — literal text matching
- Extended — recognizes
\n(newline),\t(tab),\r(return),\xNN(hex byte) - Regular Expression — full regex with backreferences in replace (
\1,$1)
Search Results Panel
When you use "Find All", results appear in a bottom panel grouped by file. Double-click any result to jump to that location.
Code Intelligence
PrimeEdit provides smart editing features through its built-in LSP client, auto-completion engine, and snippet system.
LSP Setup
Install the language server for your language. PrimeEdit connects automatically when you open a file.
| Language | Server | Install Command |
|---|---|---|
| C / C++ | clangd | sudo apt install clangd |
| Python | pylsp | pip install python-lsp-server |
| JavaScript/TypeScript | typescript-language-server | npm i -g typescript-language-server |
| Rust | rust-analyzer | rustup component add rust-analyzer |
| Go | gopls | go install golang.org/x/tools/gopls@latest |
For other languages, create ~/.config/PrimeEdit/lsp-servers.json:
{
"python": {"command": "pylsp", "args": []},
"c++": {"command": "clangd", "args": ["--background-index"]},
"rust": {"command": "rust-analyzer", "args": []}
}
Completions
- Ctrl+Space to trigger manually, or type 3+ characters for automatic popup
- Enter or Tab to accept, Escape to dismiss
- Sources (in priority order): LSP completions, language keywords, document words
Diagnostics
LSP diagnostics appear as wave underlines in the editor — red for errors, yellow for warnings. Hover over an underline (or press Ctrl+K) to see the diagnostic message.
Navigation
| Feature | Shortcut |
|---|---|
| Go to definition | F12 or Ctrl+click |
| Find references | Shift+F12 |
| Rename symbol | F2 |
| Hover documentation | Mouse hover or Ctrl+K |
Snippets
Type a snippet prefix and press Tab to expand. PrimeEdit includes built-in snippets for common language patterns. Snippet completions appear in the auto-complete popup with a snippet icon.
Block Evaluation (AI)
Select text and press Ctrl+Shift+E to send it to an LLM endpoint (Ollama by default). An inline diff appears — press A to accept or Escape to discard. Configure the endpoint via Tools > Configure Endpoint.
Git Integration
PrimeEdit provides built-in Git support for common workflows without leaving the editor.
Gutter Indicators
When you edit a file in a Git repository, colored indicators appear in the left gutter:
- Green — added lines (new content)
- Yellow — modified lines (changed from last commit)
- Red — deleted lines (a triangle marker shows where lines were removed)
These indicators update automatically as you type.
Committing
Git > Commit (Ctrl+Shift+G) opens the commit dialog:
- File list with staging checkboxes — select which files to include
- Diff preview for each file — review changes before committing
- Commit message editor with subject/body separation
Branch Switching
Git > Switch Branch shows a list of local branches. Select one to switch. PrimeEdit reloads any open files that changed between branches.
Remote Editing
Edit files on remote servers over SSH without leaving PrimeEdit.
Setting Up a Connection
- Open File > Open Remote (Ctrl+Shift+O)
- Click Add Connection and enter hostname, username, port, and key file path
- Browse the remote filesystem and open files
Editing Remote Files
Remote files open like any local file. When you save (Ctrl+S), changes are automatically uploaded to the remote server. The tab title shows the remote path with a network icon to distinguish remote files from local ones.
ssh-agent or specify the key file path in the connection settings.
Themes
Open Settings > Preferences, go to the Appearance tab, and select a theme from the dropdown. The change applies instantly — including syntax highlighting colors.
Available Themes
Notepad++ (default), Default Light, Default Dark, Olive, Monokai, Dracula, Nord, Solarized Light, Solarized Dark.
Custom themes can be created as JSON files and imported via the Theme Editor.
Macros
Record a sequence of actions and replay them.
- Press F9 to start recording
- Perform your editing actions (typing, navigation, etc.)
- Press Shift+F9 to stop recording
- Press F10 to play back the macro
Run Multiple Times
Via Macro > Run Multiple Times: enter a count, or choose "Run until end of file" to repeat the macro until the cursor reaches the last line.
Save & Load
Macros can be saved to disk and loaded later. Saved macros persist across restarts via ~/.config/PrimeEdit/macros.json.
Large Files
PrimeEdit handles files that other editors cannot open.
- Files >10MB automatically open in large file mode — memory-mapped, viewport-loaded
- Files >100MB open in read-only mode by default
- A 1GB file uses only 95MB of memory (verified by stress testing)
- Scrolling is smooth — only visible lines plus a buffer are in memory
Plugins
PrimeEdit supports a plugin system for extending the editor with custom functionality.
Plugin Locations
- User plugins:
~/.config/PrimeEdit/plugins/ - System-wide plugins:
/usr/lib/prime-edit/plugins/
Managing Plugins
Open Tools > Plugins to see all installed plugins. Toggle the checkbox next to any plugin to enable or disable it. Changes take effect immediately.
Writing a Plugin
Plugins are Qt shared libraries (.so) implementing the PluginInterface. Each plugin receives an EditorAPI object with access to:
- Buffer API — read and modify document content
- File API — open, save, and manage files
- UI API — add menus, toolbar buttons, and panels
- Settings API — read and write configuration
See the Technical Documentation for the full plugin API reference.
Configuration
Open via Settings > Preferences.
Settings Paths
| File | Location |
|---|---|
| Editor settings | ~/.config/PrimeEdit/settings.json |
| LSP server config | ~/.config/PrimeEdit/lsp-servers.json |
| Saved macros | ~/.config/PrimeEdit/macros.json |
| AI endpoint config | ~/.config/PrimeEdit/eval-endpoint.json |
| User plugins | ~/.config/PrimeEdit/plugins/ |
| Session data | ~/.local/share/PrimeEdit/sessions/ |
| Unsaved document cache | ~/.local/share/PrimeEdit/sessions/unsaved/ |
Editor Preferences
- Font family — choose any monospace font (default: DejaVu Sans Mono)
- Font size — 6pt to 72pt
- Tab width — 1 to 16 spaces
- Insert spaces — tabs vs spaces
- Word wrap, line numbers, highlight current line, minimap
File Defaults
- Default encoding and line ending
- Trim trailing whitespace and insert final newline on save
- Auto-save interval (default: 30 seconds)
- Restore session on startup
~/.config/PrimeEdit/settings.json and take effect immediately. Click Apply to see changes without closing the dialog. To reset everything, delete the settings file and restart PrimeEdit.