Skip to content

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.

IconAction
Open on..Opens the file in the built-in Web Browser tab.
Open in File ManagerOpens the file in your file manager.
Show in Script RunnerReveals 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 fileRenames the file.
Delete fileDeletes 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.

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 opened outside any project opens in Standalone Files instead. There the header shows the folder as plain text, the Open on.., Show in Script Runner, and file-lock icons are not shown, and the History view is unavailable because there is no repository behind the file. Right-click the filename for 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, referenced images. External stylesheets and external scripts are not loaded in the preview. To view external file references in an HTML file, click the External files not loaded in preview icon. In the Not loaded in preview dropdown, click a file to open the file.

For HTML files, click the Open in Browser icon to open a rendered view of the file in a browser.

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 also shows change markers. While a file has a conflict, Zide hides the change markers and marks conflict blocks in amber in the minimap.

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.

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.

IconAction
SaveSave changes made to a file.
Save AsSave the file with a new name or to a new location.
Revert to savedDiscard unsaved changes and reload the file.
Find/ReplaceSearch for or replace terms in a file.
Go to SymbolJump to a function, class, or variable definition in the file.
Toggle document outlineShow or hide the language server symbol tree beside the code.
Toggle git blame annotationsToggle per-line git blame annotations.
Toggle word wrapOverride the default line wrapping for the current tab and session.
Toggle minimapToggle the code overview minimap on the right edge.
Split EditorToggle a second editable view below the first at a 50/50 split.
Split PreviewShow or hide a rendered preview beside supported markup, HTML, and SVG files.

When editing markdown files, an additional formatting toolbar appears.

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.

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

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, encoding and BOM state, line endings, and final-newline state. Metadata also includes the created, modified, and accessed dates of a 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.

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.

RowDescription
TrackingTracked when a Git LFS rule covers the file.
Object sizeThe size of the LFS content.
DownloadedWhether 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 pushWhether 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.
OIDThe 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.

Send to Zide Assist

Right-click the file and click Send File to Zide Assist > To New Conversation to send the file as an attachment to a new Zide Assist tab. Right-click the file and click Send File to Zide Assist > To Current Conversation to send the file as an attachment to the most recent selected Zide Assist tab.

Select content in the file, right-click the file, click Send File to Zide Assist and then click either Explain Selection to Zide Assist or Send Selection to Zide Assist to send the selected content to a Zide Assist tab.

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.