File view
You can preview a rendered view of a file, edit a file, view the commit history of a file, and view the metadata of a file in the File view.
File view layout
To open a file in the File view, click it in the Files activity.
The following table lists the icons in the File view header.
| Icon | Action |
|---|---|
| Open on.. | Opens the file in the built-in Web Browser tab. |
| Open in File Manager | Opens the file in your file manager. |
| Show in Script Runner | Reveals the file’s scripts and programs in the Script Runner activity. Only appears for files the Script Runner recognizes, such as package.json, a Makefile, or a project file. |
| Rename file | Renames the file. |
| Delete file | Deletes the file. |
In the header, the directory path of the open file is displayed below the filename. Click a folder on the directory path to show it in the Files activity. Right-click the file name in the header to copy the full path or the relative path of the file.
Views
Click Preview, Edit, History, or Details to change your current view of the file. Some views are unavailable for certain file types.
Preview view
You can view renders of files in the Preview view. Files render differently based on the file type. For example, image file types render images with zoom controls while Markdown files preview rendered HTML.
Most file types open in Preview view by default. File types without a Preview view open in the Edit view instead.
HTML files preview as a single-file render: the file’s own markup, inline styles, and inline scripts, plus the images it references. External stylesheets and external scripts are not loaded in the preview, so a page that relies on a separate CSS file previews unstyled by design. When a file references external files, a pill in the preview toolbar shows how many were not loaded. Click the pill to list them; references that point to files in your repository are clickable.
The HTML preview toolbar includes an Open in Browser button that opens the file in a real browser engine for a full render of the page. The destination follows the File Previews category in Settings > Browser: the built-in Web Browser tab when the category is on (the default), or your system browser when it is off. Shift+click opens the other destination, and Ctrl+click (Cmd+click on macOS) opens a new Web Browser tab.
Edit view
You can edit files with a code editor in Edit view. The code editor supports all common languages such as Python and Java.
The following table describes each icon in the Edit view toolbar.
| Icon | Action |
|---|---|
| Save | Save changes made to a file. |
| Save As | Save the file with a new name or to a new location. |
| Revert to saved | Discard unsaved changes and reload the file. |
| Find/Replace | Search for or replace terms in a file. |
| Go to Symbol | Jump to a function, class, or variable definition in the file. |
| Toggle git blame annotations | Toggle per-line git blame annotations. |
| Toggle word wrap | Toggle line wrapping. |
| Toggle minimap | Toggle the code overview minimap on the right edge |
The bottom status bar shows the current cursor position and selection information.
When editing markdown files, an additional formatting toolbar appears.
History view
You can view the 50 most recent git commits of a file in History view. Each commit in the History view displays the following information.
- Commit hash: The identifying hash of the commit.
- Commit message: The message of the commit.
- Author: The author of the commit.
- Changes: The number of additions and deletions in a file.
- Timestamp: How long ago the commit was created.
Click a commit to open the commit in the Commit view. For more information about the Commit view, see Commit.
Details view
You can view the metadata of a file in the Details view. File metadata includes the name, file type, file path, file size, attributes, Git status, and the encoding type of a file. Metadata also includes the created, modified, and accessed dates of a file.
Unsaved changes
Files with unsaved changes show a dot indicator on their tab. If you close a file with unsaved changes, Zide prompts you to discard or save your changes.
Merge conflict resolution
When a file contains merge conflict markers, a conflict toolbar appears with Previous/Next Conflict navigation that shows which conflict you’re viewing. Inline buttons let you Accept Current, Accept Incoming, or Accept Both for each conflict.
External file changes
If you edit a file outside of Zide while the file is open, the file reloads automatically. If the edited file is open in Zide with unsaved changes, you are notified that the file was modified outside of Zide. Click Reload from Disk to reload the file with the changes or click Keep My Changes to keep the unsaved changes in Zide.