Skip to Content
GuidesProjects and BuildingThe Project Explorer

The Project Explorer

The Project Explorer shows the files and folders of the open project. Use it to open files, to create, rename and delete them, to choose the build root, and to load tapes and other media into the machine. Klive opens each file in the editor or viewer that fits its type.

Opening the Explorer

Click Explorer in the activity bar. The side bar is on the left by default; to move it to the right, turn on Settings › Appearance › Sidebar on the right, or right-click the activity bar and choose Move Sidebar to the Right.

With no folder open, the Explorer offers Open Folder and Create a Klive Project. Above the tree, the Open Editors panel, collapsed at first, lists the documents you have open; its badge shows how many.

Working with the tree

A project in the Explorer: the home icon marks the project folder, the build icon the build root
The Project Explorer of a ZX Spectrum 48K project named MyGame: the code, gfx and tapes folders expanded, the build root code.kz80.asm marked with the build icon and open in the editor
  • Click a file to open it. A folder expands and collapses when you click it.
  • Keyboard: ↑ and ↓ move through the tree, Space opens a file or expands a folder, Delete deletes the selected item.
  • Drag a file onto the Disk Explorer to add it to a disk image.
  • The root folder of a Klive project shows a home icon, and the build root a build icon after its name.

The context menu

Right-click a file or folder:

The context menu of a folder
The context menu of the code folder: New file, New folder, Expand all, Collapse all, Reveal in Finder, Rename, Exclude and Delete
ItemShown forDoes
RefreshThe root folderReads the folder again from disk.
Make Klive Project…The root folder, in a plain folderOpens the dialog that makes the folder a Klive project. See Make a folder a Klive project.
New file…, New folder…FoldersCreates an item in the folder.
Expand all, Collapse allFoldersOpens or closes every folder below.
Reveal in Finder (macOS) / Reveal in File Explorer (Windows)Every itemShows the item in your system’s file manager.
Rename…Every item except the root and klive.projectRenames the item. Rename a file to change the extension, and with it the editor that opens it.
ExcludeEvery item except the root and klive.project, in a Klive projectHides the item from the Explorer.
DeleteEvery item except the root and klive.projectDeletes the item from disk, after you confirm. It does not go to the trash.
Promote to Build Root / Demote from Build RootSource filesMakes the file the build root, or stops it being one. In a plain folder it is disabled, and its tooltip points to Make Klive Project….

Some file types add items of their own. Tapes (.tap, .tzx) offer to load and run, insert, or load and debug the tape, on the machines that can play them; see Tapes. ZX80 and ZX81 program files, HT-1080Z tapes, NEX files, Z88 snapshots and .ksx scripts have their own items too.

A tape file adds its own items below the common ones
The context menu of hello.tap: the common items, then Load and run tape, Insert tape and Load and debug tape

Excluded items

Excluded files and folders are hidden from the tree but stay on disk. The button at the right of the project’s root folder opens the Excluded Items dialog, where you can bring them back. The list is saved in the project.

What opens where

Klive decides by the file name; the first matching rule wins.

Source code opens in the code editor, with the language’s colouring and features. The extensions and their compilers are in File types: .kz80.asm, .asm, .zxbas, .bas, .sjasm, .c, .h, .pas, .zxb.asm, .ksx, plus .lua and .dis.

Text: .txt, and SkoolKit’s .skool and .ctl, open in the text editor.

Media and machine files open in their own viewers:

ExtensionsOpens in
.tap, .tzxThe tape viewer (Tapes)
.p, .81, .o, .80The ZX81/ZX80 program viewer (ZX81 and ZX80)
.cas, .cmd, tokenised .basThe HT-1080Z tape viewer (HT-1080Z)
.dsk, .trd, .scl, .mdrThe Disk Explorer
.img, .hdf, .cimThe hard-disk and SD card explorer (Disk Explorer)
.sna, .z80, .szxThe snapshot viewer (Snapshots)
.z88The Z88 snapshot viewer (Z88 snapshots)
.rzxThe RZX viewer (RZX recordings)
.klsThe machine state viewer (Machine state files)
.klrThe debug recording viewer (Debug recordings)
.nexThe NEX viewer (NEX files)
.rom.disThe ROM annotation editor (Annotations)
.scr, .sl2, .nxi, .slr, .shc, .shrThe screen file viewer
.pal, .nplThe palette editor (Sprite and palette editors)
.sprThe sprite editor (Sprite and palette editors)
.vidThe video viewer
.bin, .romThe binary dump viewer
.png, .jpg, .jpeg, .gif, .bmp, .webp, .svg, .ico, .tiff, .tifThe image viewer

The binary dump viewer shows the bytes with their characters beside them, with the toolbar of the Memory view: Go to an offset, Find bytes (21 ?? 58) or quoted text, 8, 16 or 32 Bytes a row, Hex or Dec, and an Inspector that reads the byte under the cursor every way and sums up a selection (click, Shift+click or Shift+arrows). It only reads the file. The image viewer offers Original size (with zoom buttons), Fit Width and Fit Page, and you can drag a large image to pan it.

Any other file is checked when you first open it: valid UTF-8 text opens in the text editor, anything else in the binary dump viewer. Klive remembers the result, and the Explorer’s icon, until you close the project.

To make Klive treat your own extensions (such as .z80) as a source language, see Use your own extensions.

Last updated on