File Editor
The File tab is a detail tab that opens when you click a file in the File Browser, search results, commit diffs, or anywhere else a file is referenced. Each file opens in its own tab, and multiple files can be open simultaneously.
Modes
The File tab has four modes accessible via inner tab buttons at the top of the tab:
| Mode | Purpose |
|---|---|
| Preview | Rendered view of the file (markdown, images, media, JSON trees, etc.) |
| Edit | Full code editor with syntax highlighting |
| History | Git commit history for this file |
| Details | OS-level file metadata (size, dates, permissions) |
The default mode depends on the file type. Markdown, HTML, images, and media files open in Preview. Code and config files open in Edit. Binary files open in Details.
Preview Mode
Preview renders files differently based on their type:
- Markdown — rendered HTML with syntax-highlighted code blocks, frontmatter display, and a Contents dropdown for heading navigation
- AsciiDoc / Org Mode / reStructuredText — rendered HTML with document outline
- HTML — sandboxed iframe preview with an Open in Browser button
- SVG — vector preview with Zoom In/Out controls (10%–500%), Reset Zoom, and a toggleable checkered background for transparency
- PDF — embedded PDF viewer with page navigation
- Images (PNG, JPG, GIF, WebP, BMP, ICO, AVIF) — native image preview
- Audio (MP3, WAV, OGG, FLAC, AAC, M4A) — HTML5 audio player
- Video (MP4, WebM, Ogg) — HTML5 video player
- JSON — interactive tree view with expandable nodes and copy-to-clipboard
- CSV / TSV — sortable, filterable table with resizable columns
- XML — expandable element tree
Files without a dedicated renderer show a message directing you to the Edit mode.
Edit Mode
A full-featured code editor powered by CodeMirror with syntax highlighting for all common languages.
Editor Toolbar
| Button | Action |
|---|---|
| Save | Save file to disk (enabled when file has unsaved changes) |
| Save As | Save to a new location |
| Revert | Discard unsaved changes and reload from disk |
| Find/Replace | Open the find and replace panel |
| Go to Symbol | Jump to a function, class, or variable definition |
| Blame | Toggle per-line git blame annotations in the gutter |
| Word Wrap | Toggle line wrapping |
| Minimap | Toggle the code overview panel on the right edge |
Markdown Toolbar
When editing markdown files, an additional formatting toolbar appears:
- Bold (Ctrl+B), Italic (Ctrl+I), Strikethrough
- Heading (cycles through H1–H3)
- Link (Ctrl+K), Image
- Bullet List, Numbered List, Task List
- Quote, Inline Code, Code Block
- Horizontal Rule, Table
- Split View — shows a live preview alongside the editor with synchronized scrolling
Status Bar
The bottom status bar shows the current cursor position (line and column) and selection information, updated in real time.
Unsaved Changes
Files with unsaved changes show a dot indicator on their tab. The Save and Revert buttons become enabled. If you close a dirty file, Glint prompts you to save or discard changes.
Git Blame
Toggle blame annotations to see who last modified each line. The gutter shows the abbreviated commit hash and author name. Hover for full details. Lines you’ve modified but not yet committed are tracked separately as “dirty lines.”
Merge Conflict Resolution
When a file contains merge conflict markers, a conflict toolbar appears with Previous/Next Conflict navigation and a counter showing your position (e.g., “Conflict 2 of 5”). Inline buttons let you Accept Current, Accept Incoming, or Accept Both for each conflict.
History Mode
Shows the git commit history for this specific file — up to 50 recent commits.
Each row displays:
- Short hash (clickable — opens the Commit tab)
- Local indicator (green dot for unpushed commits)
- Ref badges (branches and tags)
- Commit message (first line)
- Author name
- Insertions/deletions
- Relative date
Click the split-diff icon on any commit to open a side-by-side diff of that file at that revision.
Details Mode
Displays OS-level file metadata:
- Name, full path, and location relative to the repo root
- Created, modified, and accessed timestamps
- File size (human-readable)
- Permissions — readable, writable, executable flags
- Owner/group (Unix) or hidden/system attributes (Windows)
Header Actions
The file header includes buttons for:
- Open in External Editor — launches your configured IDE
- Open on GitHub — opens the file on GitHub at the current branch
- Open in File Manager — opens the containing folder
- Rename — prompts for a new filename
- Delete — removes the file (with confirmation)
Right-click the file path in the header for options to copy the full path, relative path, or filename.
External File Changes
If a file changes on disk while you have it open:
- No unsaved changes — the file reloads automatically
- Unsaved changes — a notification bar appears with Reload, Ignore, and Compare options
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl+S | Save |
| Ctrl+Shift+S | Save As |
| Ctrl+G | Go to Line |
| Ctrl+F | Find/Replace |
| Ctrl+Shift+O | Go to Symbol |
| Ctrl+B | Bold (markdown) |
| Ctrl+I | Italic (markdown) |
| Ctrl+K | Insert link (markdown) |