Frequently Asked Questions

Answers to the most common questions about PrimeEdit.

General

What is PrimeEdit?

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.

What is PrimeEdit built with?

C++17, Qt 5/6, CMake. The binary is approximately ~7MB with no runtime dependencies beyond Qt.

Does PrimeEdit run on Windows or macOS?

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.

Is PrimeEdit open source?

Yes. PrimeEdit is developed by Green Olive Tech LLC under an open source license.

How does PrimeEdit compare to VS Code?

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.

How does PrimeEdit compare to Notepad++?

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

How do I undo/redo changes?

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.

How do I select a column (rectangular block)?

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.

How do I jump to a matching bracket?

Place your cursor next to a bracket (( ) [ ] { }) and press Ctrl+B. Matching brackets are highlighted green; unmatched brackets are highlighted red.

How do I sort lines?

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.

Can I record and replay macros?

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.

How do I toggle comments?

Ctrl+/ toggles single-line comments. For HTML/XML, it uses <!-- --> block comments automatically.

Multi-Cursor & Selection

How do I use multi-cursor editing?

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.

How do I split the screen?

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.

Does multi-cursor work with auto-close brackets?

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.

Can I undo multi-cursor edits?

Yes. All multi-cursor edits are atomic — one Ctrl+Z undoes the entire operation across all cursor positions.

Files & Encoding

Will my unsaved work be lost if I close PrimeEdit?

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++.

How does encoding detection work?

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.).

How do I change a file's encoding or line endings?

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.

What happens when a file is modified externally?

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.

Can PrimeEdit open binary files?

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

What's the fastest way to search?

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.

Can I search across multiple files?

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.

Does search support regular expressions?

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.

What is "Extended" search mode?

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.

How do I highlight all matches?

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

How many languages does PrimeEdit support?

96 languages have syntax highlighting definitions. Language is auto-detected from file extension, filename, shebang line, or content analysis.

How do I add syntax highlighting for a new language?

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.

How do I set up LSP for my language?

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.

Why aren't LSP features working?

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

How do I see Git changes in the editor?

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.

How do I commit from PrimeEdit?

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.

How do I switch branches?

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.

How do I open a remote file?

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

Where are plugins stored?

~/.config/PrimeEdit/plugins/ for user plugins, /usr/lib/prime-edit/plugins/ for system-wide plugins.

How do I enable/disable a plugin?

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.

How do I write a plugin?

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

How large a file can PrimeEdit open?

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.

Why does a large file open in read-only mode?

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.

How much memory does PrimeEdit use?

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

What is block evaluation?

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.

Do I need an internet connection?

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.

How do I set up Ollama?

Install Ollama from ollama.ai, then pull a model: ollama pull llama3. PrimeEdit connects to localhost:11434 by default. No additional configuration needed.

Block evaluation returns an error

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

Where are settings stored?

~/.config/PrimeEdit/settings.json — all editor preferences, theme selection, file defaults.

Where are sessions stored?

~/.local/share/PrimeEdit/sessions/ — open tabs, cursor positions, bookmarks, fold state. Unsaved documents are cached in the unsaved/ subdirectory.

How do I reset all settings to defaults?

Open Settings > Preferences and click Reset to Defaults. Or delete ~/.config/PrimeEdit/settings.json and restart.

Troubleshooting

PrimeEdit won't start / crashes on launch

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 --version or qmake --version
Syntax highlighting doesn't work for my file

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).

The file shows as modified when I haven't changed anything

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 don't apply

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.