Add footer for edition
This commit is contained in:
parent
c87d310f7a
commit
1964cb7fd6
2 changed files with 21 additions and 18 deletions
|
|
@ -2,8 +2,9 @@
|
||||||
.title = "Minimodes",
|
.title = "Minimodes",
|
||||||
.date = @date("2025-10-15T00:00:00"),
|
.date = @date("2025-10-15T00:00:00"),
|
||||||
.author = "Igor Támara",
|
.author = "Igor Támara",
|
||||||
.layout = "index.shtml",
|
.layout = "tutorial.shtml",
|
||||||
.draft = false,
|
.draft = false,
|
||||||
|
.custom = { .githubedit = "https://github.com/neurocyte/flow-website/tree/master/content/docs/architecture/minimode.md"},
|
||||||
---
|
---
|
||||||
|
|
||||||
Minimodes can be used by other modes adding functionality
|
Minimodes can be used by other modes adding functionality
|
||||||
|
|
@ -38,7 +39,8 @@ minimode.
|
||||||
Actions executed by each minimode are stored one per
|
Actions executed by each minimode are stored one per
|
||||||
file under `src/tui/mode/mini/`. The command that
|
file under `src/tui/mode/mini/`. The command that
|
||||||
opens opens the door to the minimode is linked from
|
opens opens the door to the minimode is linked from
|
||||||
`src/tui/tui.zig` which calls them dynamically when needed.
|
`src/tui/tui.zig` which calls the minimodes dynamically
|
||||||
|
when needed.
|
||||||
|
|
||||||
Look for `mini` inside `tui.zig` to find out which minimodes
|
Look for `mini` inside `tui.zig` to find out which minimodes
|
||||||
are present and where to look to learn how each minimode
|
are present and where to look to learn how each minimode
|
||||||
|
|
@ -46,14 +48,14 @@ does its own task.
|
||||||
|
|
||||||
### Minimode definition
|
### Minimode definition
|
||||||
|
|
||||||
Possibly the simplest minimode that will be found that does
|
Possibly the simplest minimode that does not require
|
||||||
not require defining a particular widget is the `replace`
|
defining a particular widget is the `replace` minimode,
|
||||||
minimode, used in helix mode and vim mode. To enter the
|
used in [helix](/docs/mode/helix) and vim mode. To enter the
|
||||||
minimode in Helix while in `NOR` or `INS` use the keybind
|
minimode in Helix while in `NOR` or `INS` use the keybind
|
||||||
**r**, it consumes another key and replaces the current
|
**r**; it consumes another key and replaces the current
|
||||||
character under the main cursor with the pressed key.
|
character under the main cursor with the immediately pressed
|
||||||
If there are multiple selections, all the characters are
|
key after **r**. If there are multiple selections, all the
|
||||||
replaced by the one typed after **r**.
|
characters are replaced by the one typed after **r**.
|
||||||
|
|
||||||
- The minimode needs to expose a `create` function with
|
- The minimode needs to expose a `create` function with
|
||||||
type
|
type
|
||||||
|
|
@ -83,7 +85,7 @@ pub fn receive(*Self, tp.pid_ref, tp.message) error{Exit}!bool
|
||||||
- A `commands` field that will expose the minimode `Collection`
|
- A `commands` field that will expose the minimode `Collection`
|
||||||
of `Commands`.
|
of `Commands`.
|
||||||
|
|
||||||
An special command `mini_mode_insert_code_point` as an element
|
- An special command `mini_mode_insert_code_point` as an element
|
||||||
of the commands collection with type:
|
of the commands collection with type:
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
|
|
@ -91,7 +93,7 @@ pub fn mini_mode_insert_code_point(*Self, Ctx) Result
|
||||||
```
|
```
|
||||||
|
|
||||||
acting as the default handler of the key presses that the minimode
|
acting as the default handler of the key presses that the minimode
|
||||||
will receive when there is no other defined.
|
will receive when there is no other keybind defined for the minimode.
|
||||||
|
|
||||||
All the keys were handled and managed by the default "invisible"
|
All the keys were handled and managed by the default "invisible"
|
||||||
widget that processes the keys for the minimode. And there is
|
widget that processes the keys for the minimode. And there is
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,9 @@
|
||||||
.title = "Helix Mode",
|
.title = "Helix Mode",
|
||||||
.date = @date("2025-10-10T00:00:00"),
|
.date = @date("2025-10-10T00:00:00"),
|
||||||
.author = "Igor Támara",
|
.author = "Igor Támara",
|
||||||
.layout = "index.shtml",
|
.layout = "tutorial.shtml",
|
||||||
.draft = false,
|
.draft = false,
|
||||||
|
.custom = { .githubedit = "https://github.com/neurocyte/flow-website/tree/master/content/docs/mode/helix.md"},
|
||||||
---
|
---
|
||||||
|
|
||||||
This document describes implementation of Helix Mode.
|
This document describes implementation of Helix Mode.
|
||||||
|
|
@ -17,12 +18,12 @@ actions that can be done in Helix. The conversely is not true.
|
||||||
`:` opens up Flow's rich command palette that might have
|
`:` opens up Flow's rich command palette that might have
|
||||||
functionalities Helix users are used to have, if you find
|
functionalities Helix users are used to have, if you find
|
||||||
something missing, it's possible to
|
something missing, it's possible to
|
||||||
[open a Feature Request](https://github.com/neurocyte/flow/issues)
|
[open a Feature Request](https://github.com/neurocyte/flow/issues),
|
||||||
to see if there is anyone interested in porting it. Or maybe
|
make sure to review [other issues](https://github.com/neurocyte/flow/issues?q=is%3Aissue%20state%3Aopen%20label%3Ahelix-mode)
|
||||||
someone is already creating or interested in the one you are
|
to avoid repeating or see if there is anyone interested
|
||||||
missing. [Join Discord](https://discord.gg/kzJC9fA7) to ask
|
in porting on [Discord](https://discord.gg/kzJC9fA7) to ask
|
||||||
if anyone is working on something similar or there is a
|
if or there is a workaoround, remember that it's possible
|
||||||
workaoround.
|
to bounce back to Flow mode if needed.
|
||||||
|
|
||||||
## Enhancing hx mode
|
## Enhancing hx mode
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue