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 commands are in the More actions menu in the File view header.
| Action | Result |
|---|---|
| Open on host | Opens the file on its Git host, using your browser settings. |
| Open in File Manager | Opens the file’s containing folder in your file manager. |
| Open in Default Application | Opens the file in the application your system uses for its file type. |
| Open in Browser | Opens an HTML file in a browser, which loads its external files. Shift+click opens it in the other destination set in Settings > Browser. Only appears for HTML files. |
| Run | Launches an executable without a terminal. |
| Run in Terminal | Runs an executable or supported script in a Zide terminal and keeps its output visible. |
| 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. |
| Lock File, Unlock File, Force Unlock | Locks or unlocks the file with Git LFS. These commands appear only for files eligible for Git LFS locking. See Git LFS. |
| Rename | Renames the file. |
| Delete | Deletes the file. |
Temporarily unavailable commands are dimmed. Their tooltips explain why.
The run commands appear for Windows .exe and .com files, or executable files on macOS and Linux. They start the program in its containing folder with no arguments. Opening a file does not run it. In Hex, executables are labeled Executable, with the same two run buttons in the toolbar.
Shell scripts (.sh, .bash, .zsh, .fish, .ksh) and PowerShell scripts (.ps1) offer Run in Terminal in More actions, including from the Edit view. Windows also supports batch files (.bat, .cmd) and shell scripts through Git Bash. A compatible interpreter must be installed. Zide honors the project’s Shell for Script Runs choice when compatible and reports when the required interpreter is unavailable. Executable scripts on macOS and Linux use their shebang. Save any edits before running the file.
While a Git LFS lock is held, the header shows a lock icon beside More actions. Its tooltip identifies the lock owner.
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.
Click the Git status badge beside the file name to open Staging with the file highlighted. A conflicted file has no badge. Use More actions > Show in Staging in the conflict strip instead.
A file outside all open Project Tabs opens in Standalone Files. The header shows its folder as plain text. More actions omits Open on host, Show in Script Runner, and the lock commands. History is unavailable because the file has no associated repository. Right-click the filename to find Open Containing Folder as Project….
Views
Click Preview, Edit, Hex, History, or Details to change your current view of the file.
Preview, Edit, Hex, and Details are available for every file. When a view has nothing to show, such as Preview for a .zip or Edit for an image, the view tells you why and gives you an Open in Default Application button. History needs a repository, so it is not shown in Standalone Files.
If you rename a file and your current view no longer has anything to show, Zide moves you to a view that does.
If the file on disk is a Git LFS pointer, Preview and Edit show File content is unavailable in the working folder. Click Pull File to download the content of this file only. After the pull, the file tab shows the content. Git LFS does not replace files with local changes. Click Show in Git LFS to highlight the file in the Files list of the Git LFS tab.
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.
File types with no render, such as source code, archives, and executables, show No preview available with a button to open the file in the application your system uses for that file type.
HTML files preview as a single-file render with the file markup, inline styles, inline scripts, and referenced images. The preview shows the current content, including unsaved edits. It does not load external stylesheets and external scripts. When the preview skips a stylesheet or a script file, the toolbar shows Preview incomplete. Click it to see the skipped files. A file in the project shows as a link. Click it to open the file, or Ctrl+click (Cmd+click on macOS) or middle-click to open it in a new tab.
To see the full page, click Open in Browser at the top of the list, or click More actions > Open in Browser. The browser loads the external files. It opens the saved file, so save your changes first.
Document minimap
Markdown, AsciiDoc, Org, and reStructuredText previews show a minimap beside a long document with sections. Blocks shows one mark for each section, sized to the section’s length, so you can see where you are and how long each section is. Point to a mark to preview the heading and the start of its text. Click the mark to scroll to that heading. Minimap shows the shape of the document: headings, text, code blocks, and tables. Contents still lists every heading.
A document needs at least two headings. A document with fewer headings, or one that fits in the pane, shows no minimap. To change the minimap, right-click the document or the minimap, or click More actions in the file header, and choose a rendering under Minimap. Previews start with Blocks. Your choice applies to every document preview and is kept after a restart. HTML, image, PDF, and other previews have no minimap.
To copy text from the preview, select it, right-click on it, and click Copy. See Copy selected text.
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.
Files that Zide cannot edit safely as text, such as images, PDFs, and binary files, show Cannot edit this file with a button to open the file in your system’s default application.
If a file is named like text but holds binary content, the Edit view names the reason and adds Open as Text. Open as Text reads the file as text for this tab session only and does not change the file.
The bottom status bar shows the current cursor position, selection information, effective indentation space, output encoding, and output line endings. Click the Indentation to change the amount of spaces for each indentation. Click the Output encoding to change encoding status. Click the Output line endings to change the characters used for a new line.
Click a line number to select the whole line, including its trailing newline. Drag from a line number to select multiple lines. Zide highlights the current line number.
For files in a Git repository, change markers appear next to each changed line. Green marks indicate added lines, blue marks indicate modified lines, and red marks indicate deleted lines at the nearest line.
The minimap beside the code shows the same marks. While a file has a conflict, Zide hides the change markers and marks conflict blocks in amber.
Click a marker to review the hunk. In the hunk preview, click Stage Hunk to stage the selected hunk. Click Revert Hunk to revert the selected hunk. Click Open Full Diff to open the file in Diff view.
For a file that a Git filter changes, such as a Git LFS file, Stage Hunk and Revert Hunk are disabled, and the preview says why. Stage the whole file from Staging. See Files that Git filters.
If the saved file or its content in the index changes after the markers update, Zide refuses the hunk action and updates the markers. Review the hunk, then try again.
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 document outline | Show or hide the language server symbol tree beside the code. |
| Toggle git blame annotations | Toggle per-line git blame annotations. |
| Toggle word wrap | Override the default line wrapping for the current tab and session. |
| Split Editor | Toggle a second editable view below the first at a 50/50 split. |
| Split Preview | Show or hide a rendered preview beside supported markup, HTML, and SVG files. |
When editing markdown files, an additional formatting toolbar appears.
Minimap
The minimap beside the code has two renderings. Minimap shows the shape of the code. Blocks shows one mark for each run of changes or conflicts. Hidden leaves the full width to the code. To change it, right-click in the code or on the minimap, or click More actions in the file header, and choose a rendering under Minimap.
Editors start with Minimap. Zide saves your choice for all current and future file editors, including after a restart. While a file is short enough to fit in the pane, Zide shows no minimap and the menu says why.
Find and replace
Press Ctrl+F (Cmd+F on macOS) or click Find/Replace to open Find at the top right of the editor. As you type, Find selects the next match from the cursor. The count shows the current match and the total. In the Find input, press Enter for the next match or Shift+Enter for the previous match. In the editor, press F3 for the next match or Shift+F3 for the previous match. Click Clear text to empty the Find input. Press Esc to close Find.
Use Match Case, Use Regex, and Match Whole Word to change how Find matches text.
To replace text, click Replace in the Find bar and type in Replace with. Click Replace to replace the current match, or Replace All to replace every match in the file. With Use Regex on, $1 inserts the first captured group. To undo a replacement, click in the editor and press Ctrl+Z (Cmd+Z on macOS).
Multiple cursors and column selection
You can use multiple cursors in Edit view. For keyboard shortcuts to use multiple cursors, see Keyboard Shortcuts.
Split Editor
Click the Split Editor icon in the toolbar to edit in two stacked views of the same file.
Drag the horizontal divider to resize the views. Double-click the horizontal divider to reset the views.
Click the Split Editor icon again to close the split editor.
Split Preview
Click the Split Preview icon to open two views of the file in Preview and Edit. The Preview view updates in real time when you make changes in the Edit view. For HTML files, Split Preview shows the same render and the same Preview incomplete list as the Preview view.
Hex view
The Hex view shows the raw bytes of the file. It is available for every file type, so you can examine a JPEG header, a byte-order mark in a text file, or a .bin that has no other view.
Each row shows its byte offset, 16 hexadecimal bytes, and the printable ASCII characters. Non-printable bytes show as a period.
Binary files with no rendered preview, such as .bin, .dat, executables, archives, and fonts, open in the Hex view. A file that is named like text but holds binary content opens in the Edit view instead, which is where you expected to go, and explains why it cannot be edited. You can click Hex to see the bytes at any time.
The Hex view is read-only and loads only the rows you scroll to. Files larger than 256 MiB show Too large to show instead of rows. Click More actions > Open in Default Application to open the file outside Zide.
History view
History view shows the 50 most recent Git commits of a file. To see older commits, click Load more at the end of the list. 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.
- Subtree: Commits created by Git subtree tooling display a Subtree badge. Hover over the badge to see the subtree folder.
In a shallow clone, older changes to the file may be missing. A notice appears at the end of the list or below the empty message. Click Fetch Full History to download the missing history for the whole repository. After the download, the list refreshes.
In a partial clone, the History view downloads the file versions it needs. A clone made with a tree filter cannot show the History view until the folders of the older commits are downloaded. Blame annotations download the older versions of the file the same way. If a download fails, a message tells you why, and the annotations stay off. See Partial clones.
Click a commit to open the commit in the Commit view. For more information about the Commit view, see Commit.
Right-click a tag name on a commit and select Copy Tag Name to copy it, Show in Tags to open it in Tags, or Show in Commits to go to that commit in Commits. Right-click a branch name to see Copy Branch Name, Show in Branches, and Show in Commits.
Details view
You can view the metadata of a file in the Details view. General shows the name, file type, file path, file size, encoding and BOM state, line endings, and final-newline state. Dates shows when the file was created, modified, and accessed. Permissions and Attributes show who can use the file and how, and Git shows the Git status of the file.
Click the Path value to show the file in the File Browser. Click the Git Status value to show the file in Staging. For Standalone Files, these values are plain text.
Permissions and attributes
Details uses the concepts of your operating system. Some rows are shown only on Windows, or only on macOS and Linux.
| Row | Description |
|---|---|
| Owner | Windows: the account that owns the file. macOS and Linux: the owner and the permissions of the owner. |
| Group | macOS and Linux: the group of the file and the permissions of the group. |
| Others | macOS and Linux: the permissions of all other users. |
| Mode | macOS and Linux: the permissions in the symbolic notation that ls -l shows and the octal notation that chmod accepts, for example rwxr-xr-x (755). Setuid, setgid, and sticky are included. |
| Read-only | Windows: whether the Read-only attribute is set. |
| Your access | What you can do with the file, as checked by the operating system. On Windows, this check includes the security settings of the file, not only Read-only. Read only (file permissions) means that the security settings prevent writing. |
| Attributes | The other attributes that are set, such as Hidden, System, and Archive on Windows, or Locked on macOS. On macOS and Linux, a file whose name starts with a dot is Hidden. |
Created shows Not available when the file system does not record a creation time. On macOS and Linux, Dates also shows Metadata changed. This is the last time that the permissions, owner, or other metadata of the file changed. It is not a creation time.
For a symbolic link, General shows Link to (the target as the link stores it) and Target path (the file that the link resolves to). The permissions and attributes are those of the target. Zide cannot open a link whose target is outside the project, so Details is not available for it.
You cannot change permissions in Details. Use your file manager or a terminal. Details reads the file when the tab opens. To see a change made outside Zide, close the tab and open Details again.
Git LFS
A Git LFS file has a Git LFS section after Git. Size on disk in General shows the file size in the working folder. For a pointer file, this value is the size of the pointer.
| Row | Description |
|---|---|
| Tracking | Tracked when a Git LFS rule covers the file. |
| Object size | The size of the LFS content. |
| Downloaded | Whether the LFS content is in the local LFS cache. No, needs pull means that the content is not in the cache. Click Pull File to download the content of this file only. |
| Needs push | Whether a local commit uses LFS content that the upload remote does not have. Zide does not check the server. Hover over the value to see the remote name. No upload remote means that there is no remote to compare with. |
| OID | The full object ID. Click the copy button to copy it. |
Pull File is disabled when Git LFS cannot select the file path individually, for example if the path contains a comma. Use Pull under Operations in the Git LFS tab. Zide shows Unknown when it cannot determine a value. If Zide cannot load Git LFS status, click Retry. Click Show in Git LFS beside the section heading to highlight the file in the Files list of the Git LFS tab.
When a file has staged and unstaged changes, the Git section shows both Staged and Modified. Click Staged to show the staged changes in Staging. Click Modified to show the unstaged changes.
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 Git reports a file as conflicted, a conflict strip appears under the file header, and every conflict in the file gets its own row of buttons in the editor.
The conflict strip appears in every view. It shows which conflict you are on and how many there are. It has Previous conflict, Next conflict, and a More actions menu with Reset this conflict and Show in Staging. When no markers remain, Previous conflict and Next conflict are hidden. The controls that act on the editor are available only in the Edit view.
Resolve one conflict
Each conflict offers Accept Current, Accept Incoming, and Accept Both. The two accept buttons name the branch each side came from. Accept Both opens a short menu with Current First and Incoming First, so you choose the order the two sides end up in.
Each action is an ordinary edit, so undo reverses it, Find works, and the language server keeps running.
View the common ancestor
Click Show Base on a conflict to expand a read-only panel holding the common ancestor of that conflict: the text both sides changed. Zide reads it from the Git index, so it is available whatever your merge.conflictStyle is set to.
If merge.conflictStyle is diff3 or zdiff3, Git also writes the ancestor into the file itself, between ||||||| and =======. Zide tints that section separately and never includes it in a resolution.
Finish the conflict
Accepting the last conflict clears the markers from the editor. It does not write the file or mark the conflict resolved in Git. The strip then reads Conflict: No markers remaining and offers Save and Stage, which writes the file and stages it in one step. Ordinary Save stays available while you keep working, and writes without staging. After you save, the button reads Stage. Git still records the file as conflicted until you stage it.
Zide refuses to stage a result the repository no longer matches. If the conflict changed after you opened it, or the file changed on disk, nothing is written and a bar reports it. If the file is written but staging fails, the bar says so and offers Retry Stage. Retry Stage checks the conflict and saved file, and stages nothing if either has changed.
If the file is outside your sparse checkout and is not in your working tree, Save and Stage and Reset this conflict are disabled. See Conflicts outside the sparse checkout.
Rebuild a conflict
If the conflict markers are damaged or another tool changed them, click More actions > Reset this conflict in the conflict strip. Zide rebuilds the file from what Git recorded and stages nothing. If you have edits to discard, Zide asks you to confirm first.
A conflicted text file with no markers shows Conflict: No markers remaining and Stage, even when you removed the markers in another tool or an earlier session. If you think the markers were lost by mistake, use Reset this conflict to rebuild them.
Conflicts with no markers
Some conflicts have no markers to edit, such as a binary file, a submodule, or a file deleted on one or both sides. Resolve these in the Diff tab that opens from Staging. See Conflicts with no markers.
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.
Assist with This
Right-click in the file and point to Assist with This. In the file view, you can also right-click the content header or an ordinary background area, or click More actions.
Under Zide Assist, click Add to Conversation to attach the file to the Zide Assist tab that you used last, or to a new one. The attachment includes changes that you did not save.
To attach part of the file, select the content before you right-click. Add to Conversation then attaches the selected text. If you select more than one range, with multiple cursors or a column selection, it attaches each range. You can also drag the selected content into a Zide Assist tab to attach it.
Under Ask Zide, click Open Ask Zide. Zide opens an Ask Zide panel beside the file. In the panel, click Explain File or Review File. To explain part of the file, select it in Edit and click Explain Selection. Explain Selection is unavailable while no text is selected. The panel uses the text that is selected when you click, so you can select other code and run the command again in the same conversation. See Ask Zide beside a tab.
To find the selected text in the project, right-click it and click Search for Selection. Find in Files opens with the text. When more than one range is selected, Search for Selection is unavailable.
For more information, see Attach items to a message.
Language servers
Language servers enable inline errors, hover types, and go-to-definition in the editor. Click the Language server icon in the app footer to view language server status. You can view and install language servers from Settings.