turbo-editors/turbo-gopublic Fork 0
145937ab1c0750b59c3b2770fac6c2875b5eec4d
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-go.git
git clone ssh://git@rickub.com/turbo-editors/turbo-go.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

📦 Turbo Go 3d7798b · on 145937ab1c0750b59c3b2770fac6c2875b5eec4d · k33g · 12h ago
browse-a-project.md · 70 lines · 3.5 KBmarkdown
Blame HistoryOpen raw

How to browse a project and open files from a tree

This guide shows how to open the project tree, walk it, and open a file from it. It assumes Turbo Go is already installed.

Open the tree

Start the editor from the project's own directory, then press F9, or choose Window ▸ Project tree.

A window opens showing the project's files, named after the directory the editor was started in:

╔═[x]════════════ turbo-go ════════════2═[■]╗
║ ▶ .turbo-go                              ║
║ ▼ internal                               ║
║   ▶ app                                  ║
║   ▼ ui                                   ║
║       window.go                          ║
║   .gitignore                             ║
║   go.mod                                 ║
║   main.go                                ║
╚══════════════════════════════════════════╝

Directories come first, then files, each group sorted. .git is the only thing hidden — .turbo-go, .gitignore and the rest are files of your project, and you may well want to open them.

Pressing F9 again brings that window forward rather than opening a second tree.

Walk it

Key Effect
Move the highlight
Open a closed directory; on anything else, step to the next row
Close an open directory; on anything else, step out to the directory it is in
Enter Open a file, or open and close a directory
Home End First / last row
PgUp PgDn A screenful at a time

A directory is read the first time you open it, so a tree on a large project costs one listing rather than a walk of everything.

Open a file

Put the highlight on it and press Enter, or click it twice.

The file opens in a window of its own, in front of the tree. A file that is already open is brought forward rather than opened twice.

See a file that was made after you opened the tree

The tree does not watch the disk. Press F5 or Ctrl-R with the tree focused, and it re-reads the project — keeping open whatever you had open, and keeping the highlight on the same entry.

Saving a file refreshes the tree for you, so a File ▸ Save as into a new name shows up without asking. A file created another way — go build in a terminal window, or git checkout — needs the refresh key.

Work with the tree and a file side by side

The tree is an ordinary window, so all the window commands apply:

  • Window ▸ Tile puts the tree and your file side by side.
  • Drag its bottom-right corner to make it narrower once you know your way around.
  • [x] closes it; F9 brings it back.

Variants

  • You started the editor from a subdirectory. The tree is rooted there, showing only that part of the project. Start from the project's own directory instead — the same rule .turbo-go/settings.toml follows.
  • A directory shows as open but empty. It could not be read, most often a permissions problem. The rest of the tree is unaffected; fix the permissions and press F5.

See also

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# How to browse a project and open files from a tree

This guide shows how to open the project tree, walk it, and open a file from it. It assumes Turbo Go is already installed.

## Open the tree

Start the editor **from the project's own directory**, then press `F9`, or choose **Window ▸ Project tree**.

A window opens showing the project's files, named after the directory the editor was started in:

```
╔═[x]════════════ turbo-go ════════════2═[■]╗
║ ▶ .turbo-go                              ║
║ ▼ internal                               ║
║   ▶ app                                  ║
║   ▼ ui                                   ║
║       window.go                          ║
║   .gitignore                             ║
║   go.mod                                 ║
║   main.go                                ║
╚══════════════════════════════════════════╝
```

Directories come first, then files, each group sorted. `.git` is the only thing hidden — `.turbo-go`, `.gitignore` and the rest are files of your project, and you may well want to open them.

Pressing `F9` again brings that window forward rather than opening a second tree.

## Walk it

| Key | Effect |
| --- | --- |
| `↑` `↓` | Move the highlight |
| `→` | Open a closed directory; on anything else, step to the next row |
| `←` | Close an open directory; on anything else, step out to the directory it is in |
| `Enter` | Open a file, or open and close a directory |
| `Home` `End` | First / last row |
| `PgUp` `PgDn` | A screenful at a time |

A directory is read the first time you open it, so a tree on a large project costs one listing rather than a walk of everything.

## Open a file

Put the highlight on it and press `Enter`, or click it twice.

The file opens in a window of its own, in front of the tree. A file that is already open is brought forward rather than opened twice.

## See a file that was made after you opened the tree

The tree does not watch the disk. Press **`F5`** or **`Ctrl-R`** with the tree focused, and it re-reads the project — keeping open whatever you had open, and keeping the highlight on the same entry.

Saving a file refreshes the tree for you, so a **File ▸ Save as** into a new name shows up without asking. A file created another way — `go build` in a terminal window, or `git checkout` — needs the refresh key.

## Work with the tree and a file side by side

The tree is an ordinary window, so all the window commands apply:

- **Window ▸ Tile** puts the tree and your file side by side.
- Drag its bottom-right corner to make it narrower once you know your way around.
- `[x]` closes it; `F9` brings it back.

## Variants

- **You started the editor from a subdirectory.** The tree is rooted there, showing only that part of the project. Start from the project's own directory instead — the same rule `.turbo-go/settings.toml` follows.
- **A directory shows as open but empty.** It could not be read, most often a permissions problem. The rest of the tree is unaffected; fix the permissions and press `F5`.

## See also

- Every key and what the tree shows, exactly: [Project tree reference](../reference/project-tree.md)
- Why it is a window rather than a docked panel, and why it does not watch the disk: [Project tree](../explanation/project-tree.md)
- Colouring it: [Theme file format](../reference/themes.md)