turbo-editors/turbo-golopublic Fork 0
v1.0.2
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-golo.git
git clone ssh://git@rickub.com/turbo-editors/turbo-golo.git

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

📦 Turbo Golo d710c1b · on v1.0.2 · k33g · 12h ago
navigate-code.md · 76 lines · 4.3 KBmarkdown
Blame HistoryOpen raw

How to move around a file

This guide shows how to get to the piece of code you are looking for. It assumes you have a file open.

Find text

Press Ctrl-F, type what you are looking for, and press Enter. The first match is selected.

  • F7 — next match
  • Shift-F7 — previous match

The search wraps round: pressing F7 repeatedly cycles through every match rather than stopping at the bottom of the file. Case is ignored unless you tick Case sensitive in the Find box.

Jump to a line number

Press Ctrl-G, type the number, press Enter. Lines count from one, as they do in the interpreter's error messages.

Jump to a declaration

Put the cursor on a name and press F12. Turbo Golo asks golo lsp where it is declared and goes to that line. When there is more than one declaration, it offers the list.

With this server the answer is file-local: a top-level function or a union declared in the file you are in. A function imported from a module of your own on disk is not resolved, and a name from an embedded module such as gololang.Errors has no file to jump to.

That is one of the questions the Code menu puts to the server, and golo lsp answers all of them but one: references (Shift-F12) and implementations within the file, a symbol anywhere in the project (Ctrl-T), and the file's own outline with Symbol in file, which is the way to see everything a file declares. Type definitions alone report nothing found. See How to ask what the code means.

If the file is already open, its window comes forward instead of opening a second one.

This needs golo on your PATH. See How to enable Golo completion.

Select and edit whole lines

Double-click a word Select it. Typing then replaces it; holding the button after the second click extends the selection from the start of the word.
Ctrl-N Open a blank line above the cursor. The cursor stays on its own text, now one line lower — room made over what you are looking at.
Ctrl-Y Delete the line the cursor is on. The cursor keeps its line number, so holding the key deletes a run of lines.

Both are Turbo C's keys. Ctrl-Y is why redo is Ctrl-R and no longer Ctrl-Y: between the editor looking like Turbo C and a habit picked up here, the first won. Ctrl-Shift-Z was not available to move redo to — a terminal delivers it as plain Ctrl-Z.

A double-click away from a word — on a space or a bracket — moves the cursor and selects nothing. Editors disagree about what a run of punctuation means, and nothing is at least an answer you can predict.

Move by word, line and file

Ctrl-← / Ctrl-→ Previous / next word
Home / End Start / end of the line
Ctrl-Home / Ctrl-End Start / end of the file
PgUp / PgDn One screenful

Hold Shift with any of these to select as you go.

Move between windows

F6 The window behind the current one
Alt-1Alt-9 That numbered window — the number is in its top-right corner
Alt-0 A list of every open window

If the windows are on top of each other, Window ▸ Tile lays them out side by side and Window ▸ Cascade stacks them with every title visible.

Variants

The file is not Golo. Everything above works except F12, which needs a language server, and the only one this editor starts is golo lsp, for Golo. Colouring is unaffected: the eight other languages the editor knows — TOML, YAML, Markdown, JavaScript, HTML, XML, Dockerfiles and shell — are coloured as usual; see Languages coloured.

You want to see where you are. The right-hand end of the status bar always shows line:column, counting from one.

You resized the terminal. Windows follow it: one that filled the terminal still fills it, and one you had moved keeps its corner where you put it. Nothing is ever left larger than the terminal.

The line is longer than the window. The view scrolls sideways to follow the cursor; the bar along the bottom of the window shows how far along you are.

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
71
72
73
74
75
76
# How to move around a file

This guide shows how to get to the piece of code you are looking for. It assumes you have a file open.

## Find text

Press **Ctrl-F**, type what you are looking for, and press **Enter**. The first match is selected.

- **F7** — next match
- **Shift-F7** — previous match

The search **wraps round**: pressing F7 repeatedly cycles through every match rather than stopping at the bottom of the file. Case is ignored unless you tick `Case sensitive` in the Find box.

## Jump to a line number

Press **Ctrl-G**, type the number, press **Enter**. Lines count from one, as they do in the interpreter's error messages.

## Jump to a declaration

Put the cursor on a name and press **F12**. Turbo Golo asks `golo lsp` where it is declared and goes to that line. When there is more than one declaration, it offers the list.

With this server the answer is **file-local**: a top-level function or a union declared in the file you are in. A function imported from a module of your own on disk is not resolved, and a name from an embedded module such as `gololang.Errors` has no file to jump to.

That is one of the questions the **Code** menu puts to the server, and `golo lsp` answers all of them but one: references (`Shift-F12`) and implementations within the file, a symbol anywhere in the project (`Ctrl-T`), and the file's own outline with **Symbol in file**, which is the way to see everything a file declares. Type definitions alone report nothing found. See [How to ask what the code means](ask-about-code.md).

If the file is already open, its window comes forward instead of opening a second one.

> This needs `golo` on your `PATH`. See [How to enable Golo completion](enable-completion.md).

## Select and edit whole lines

| | |
| --- | --- |
| **Double-click a word** | Select it. Typing then replaces it; holding the button after the second click extends the selection from the start of the word. |
| **Ctrl-N** | Open a blank line **above** the cursor. The cursor stays on its own text, now one line lower — room made over what you are looking at. |
| **Ctrl-Y** | Delete the line the cursor is on. The cursor keeps its line number, so holding the key deletes a run of lines. |

Both are Turbo C's keys. `Ctrl-Y` is why **redo is `Ctrl-R`** and no longer `Ctrl-Y`: between the editor looking like Turbo C and a habit picked up here, the first won. `Ctrl-Shift-Z` was not available to move redo to — a terminal delivers it as plain `Ctrl-Z`.

A double-click away from a word — on a space or a bracket — moves the cursor and selects nothing. Editors disagree about what a run of punctuation means, and nothing is at least an answer you can predict.

## Move by word, line and file

| | |
| --- | --- |
| **Ctrl-←** / **Ctrl-→** | Previous / next word |
| **Home** / **End** | Start / end of the line |
| **Ctrl-Home** / **Ctrl-End** | Start / end of the file |
| **PgUp** / **PgDn** | One screenful |

Hold **Shift** with any of these to select as you go.

## Move between windows

| | |
| --- | --- |
| **F6** | The window behind the current one |
| **Alt-1****Alt-9** | That numbered window — the number is in its top-right corner |
| **Alt-0** | A list of every open window |

If the windows are on top of each other, `Window ▸ Tile` lays them out side by side and `Window ▸ Cascade` stacks them with every title visible.

## Variants

**The file is not Golo.** Everything above works except F12, which needs a language server, and the only one this editor starts is `golo lsp`, for Golo. Colouring is unaffected: the eight other languages the editor knows — TOML, YAML, Markdown, JavaScript, HTML, XML, Dockerfiles and shell — are coloured as usual; see [Languages coloured](../reference/languages.md).

**You want to see where you are.** The right-hand end of the status bar always shows `line:column`, counting from one.

**You resized the terminal.** Windows follow it: one that filled the terminal still fills it, and one you had moved keeps its corner where you put it. Nothing is ever left larger than the terminal.

**The line is longer than the window.** The view scrolls sideways to follow the cursor; the bar along the bottom of the window shows how far along you are.

## See also

- Every key: [keyboard reference](../reference/keyboard.md)
- Every menu item: [menu reference](../reference/menus.md)