User Guide

Get started with PrimeEdit — a fast native text editor for Linux.

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
Tip: After building, PrimeEdit automatically installs its icon and desktop launcher to ~/.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
Unsaved work is safe. If you close PrimeEdit with unsaved content in any tab — even untitled tabs — everything is silently preserved. Next time you open PrimeEdit, all your tabs reappear exactly as you left them. No prompts. No save dialogs on quit.

Interface Overview

AreaLocationPurpose
Menu BarTop12 menus: File, Edit, Search, View, Encoding, Language, Settings, Tools, Macro, Run, Plugins, Window, ?
ToolbarBelow menuQuick access to common actions (file, edit, search, view, macro)
Tab BarBelow toolbarSwitch between open documents. Colored icons by file type.
GutterLeft of editorBookmark margin, line numbers, fold margin, Git indicators
EditorCenterMain editing area with syntax highlighting
Status BarBottomLn/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

ActionShortcut
New fileCtrl+N
Open fileCtrl+O
Open remote fileCtrl+Shift+O
SaveCtrl+S
Save AsCtrl+Alt+S
Reload from DiskCtrl+Shift+R
Close tabCtrl+W
Print PreviewCtrl+P

Editing

ActionShortcut
Undo / RedoCtrl+Z / Ctrl+Y
Cut / Copy / PasteCtrl+X / C / V
Select AllCtrl+A
Duplicate LineCtrl+Shift+D
Delete LineCtrl+Shift+K
Move Line Up / DownAlt+Up / Alt+Down
Toggle CommentCtrl+/
Go to LineCtrl+G
Jump to BracketCtrl+B
Zoom In / Out / ResetCtrl++ / - / 0

Multi-Cursor & Selection

ActionShortcut
Add cursorAlt+Click
Select next occurrenceCtrl+D
Select all occurrencesCtrl+Shift+L
Column (rectangular) selectionAlt+Drag
Column EditorAlt+C

Split-Screen

ActionShortcut
Split verticalCtrl+\
Split horizontalCtrl+Shift+\
Switch focus between panesF6
Close splitCtrl+Alt+\

Search

ActionShortcut
Incremental searchCtrl+I
Find dialogCtrl+F
Replace dialogCtrl+H
Find in FilesCtrl+Shift+F

Code Intelligence

ActionShortcut
Trigger auto-completeCtrl+Space
Hover documentationCtrl+K
Go to definitionF12 or Ctrl+Click
Find referencesShift+F12
Rename symbolF2
Expand snippetTab

Git & Remote

ActionShortcut
Git commitCtrl+Shift+G
Open remote fileCtrl+Shift+O

Macros & Tools

ActionShortcut
Start recording macroF9
Stop recording macroShift+F9
Play macroF10
Toggle bookmarkCtrl+F2 or click bookmark margin
Next bookmarkCtrl+Shift+F2
Previous bookmarkCtrl+Alt+F2
Toggle terminalCtrl+'
Block evaluation (AI)Ctrl+Shift+E
Command PaletteCtrl+Shift+P
Distraction-Free ModeCtrl+Shift+F11
Next TabCtrl+PageDown
Previous TabCtrl+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.

Atomic undo: All multi-cursor edits are grouped — one Ctrl+Z undoes the entire operation across all cursor positions.

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:

  1. Find — Find Next, Count, Find All in Current Document, Find All in All Open Documents
  2. Replace (Ctrl+H) — Replace one, Replace All, Replace in All Open Documents
  3. Find in Files (Ctrl+Shift+F) — Search across files on disk with directory picker and filters
  4. 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.

LanguageServerInstall Command
C / C++clangdsudo apt install clangd
Pythonpylsppip install python-lsp-server
JavaScript/TypeScripttypescript-language-servernpm i -g typescript-language-server
Rustrust-analyzerrustup component add rust-analyzer
Gogoplsgo 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

FeatureShortcut
Go to definitionF12 or Ctrl+click
Find referencesShift+F12
Rename symbolF2
Hover documentationMouse 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

  1. Open File > Open Remote (Ctrl+Shift+O)
  2. Click Add Connection and enter hostname, username, port, and key file path
  3. 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 keys: PrimeEdit uses your SSH key for authentication. Make sure your key is added to 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.

  1. Press F9 to start recording
  2. Perform your editing actions (typing, navigation, etc.)
  3. Press Shift+F9 to stop recording
  4. 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
No special action needed. Just open the file normally. PrimeEdit detects the file size and switches modes automatically.

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

FileLocation
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
Settings are saved to ~/.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.