Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 030a2b86c1 | |||
| 958dfa1af6 | |||
| 9112a64bcf | |||
| cdb993ea00 |
3 changed files with 65 additions and 63 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
This is my Zig text editor. It is under active development, but very stable
|
This is my Zig text editor. It is under active development, but very stable
|
||||||
and is my daily driver for almost everything.
|
and is my daily driver for almost everything.
|
||||||
|
|
||||||
[](https://www.youtube.com/watch?v=iwPg3sIxMGw)
|
[](https://www.youtube.com/watch?v=Mf3k2uFkyK4)
|
||||||
|
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
@ -49,7 +49,7 @@ and is my daily driver for almost everything.
|
||||||
|
|
||||||
# Roadmap
|
# Roadmap
|
||||||
|
|
||||||
See our [devlog](https://flow-control.dev/devlog/2025/) for on-going
|
See our [devlog](https://flow-control.dev/devlog/2026/) for on-going
|
||||||
updates from the development team.
|
updates from the development team.
|
||||||
|
|
||||||
## In Development
|
## In Development
|
||||||
|
|
|
||||||
120
help.md
120
help.md
|
|
@ -19,26 +19,25 @@ individually.
|
||||||
## Searching
|
## Searching
|
||||||
|
|
||||||
Press ctrl+f to search this help file. Type a search term and press
|
Press ctrl+f to search this help file. Type a search term and press
|
||||||
ctrl+n/ctrl+p or f3/shift+f3 to jump through the matches. Press Enter
|
ctrl+n/ctrl+p or f3/shift+f3 to jump through the matches. Press Enter to
|
||||||
to exit find mode at the current match or Escape to return to your
|
exit find mode at the current match or Escape to return to your starting
|
||||||
starting point.
|
point.
|
||||||
|
|
||||||
|
|
||||||
## Messages and logs
|
## Messages and logs
|
||||||
|
|
||||||
Messages of issues regarding tasks that are not accomplished, like
|
Messages of issues regarding tasks that are not accomplished, like trying
|
||||||
trying to close flow with unsaved files, as well as other information
|
to close flow with unsaved files, as well as other information are shown
|
||||||
are shown briefly in the bottom status bar; most recent messages can
|
briefly in the bottom status bar; most recent messages can be seen in the
|
||||||
be seen in the log view too, to open it, use ctrl+shift+p > `View log`;
|
log view too, to open it, use ctrl+shift+p > `View log`; it's possible to
|
||||||
it's possible to make it taller dragging the toolbar with the mouse
|
make it taller dragging the toolbar with the mouse up or downwards.
|
||||||
up or downwards.
|
|
||||||
|
|
||||||
|
|
||||||
## Input Modes
|
## Input Modes
|
||||||
|
|
||||||
Flow Control supports multiple input modes that may be changed
|
Flow Control supports multiple input modes that may be changed
|
||||||
interactively at runtime. The current input mode (and some other
|
interactively at runtime. The current input mode (and some other settings)
|
||||||
settings) is persisted in the configuration file automatically.
|
is persisted in the configuration file automatically.
|
||||||
|
|
||||||
- f4 => Cycle major input modes (flow, emacs, vim, helix,...)
|
- f4 => Cycle major input modes (flow, emacs, vim, helix,...)
|
||||||
|
|
||||||
|
|
@ -46,9 +45,9 @@ The current input mode is displayed at the left side of the statusbar.
|
||||||
|
|
||||||
- ctrl+shift+p or alt+x => Show the command palette
|
- ctrl+shift+p or alt+x => Show the command palette
|
||||||
|
|
||||||
The command palette allows you to fuzzy search and select commands to run. It
|
The command palette allows you to fuzzy search and select commands to run.
|
||||||
also shows any available keybind that may be used to run the command without
|
It also shows any available keybind that may be used to run the command
|
||||||
opening the palette.
|
without opening the palette.
|
||||||
|
|
||||||
- ctrl+f2 => Show all available commands and keybinds
|
- ctrl+f2 => Show all available commands and keybinds
|
||||||
|
|
||||||
|
|
@ -58,16 +57,16 @@ will insert the command name into the current document instead of executing
|
||||||
it. This is very useful for editing keybinding definition files.
|
it. This is very useful for editing keybinding definition files.
|
||||||
|
|
||||||
Run the `Edit keybindings` command to save the current keybinding mode to a
|
Run the `Edit keybindings` command to save the current keybinding mode to a
|
||||||
file in the configuration `keys` directory and open it for editing. Save your
|
file in the configuration `keys` directory and open it for editing. Save
|
||||||
customized keybinds under a new name in the same directory to create an
|
your customized keybinds under a new name in the same directory to create
|
||||||
entirely new keybinding mode that can be selected with `f4`. Delete the
|
an entirely new keybinding mode that can be selected with `f4`. Delete the
|
||||||
keybinding file from the configuration `keys` directory to revert the mode
|
keybinding file from the configuration `keys` directory to revert the mode
|
||||||
to it's built-in definition (if there is one). Changes to keybinding files
|
to it's built-in definition (if there is one). Changes to keybinding files
|
||||||
will take effect on restart.
|
will take effect on restart.
|
||||||
|
|
||||||
Keybinding modes may inherit all non-conflicting keybindings from another mode
|
Keybinding modes may inherit all non-conflicting keybindings from another
|
||||||
by adding an `inherit` option to the `settings` section of the keybind file
|
mode by adding an `inherit` option to the `settings` section of the keybind
|
||||||
like this:
|
file like this:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|
@ -81,9 +80,9 @@ like this:
|
||||||
This allows you to make only minor additions/changes to an existing builtin
|
This allows you to make only minor additions/changes to an existing builtin
|
||||||
mode without copying the whole mode and is easier to keep up-to-date.
|
mode without copying the whole mode and is easier to keep up-to-date.
|
||||||
|
|
||||||
Additionally, individual sub-modes may inherit all non-conflicting keybindings
|
Additionally, individual sub-modes may inherit all non-conflicting
|
||||||
from another sub-mode of the same mode by adding an `inherit` option to the
|
keybindings from another sub-mode of the same mode by adding an `inherit`
|
||||||
sub-mode section like this:
|
option to the sub-mode section like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
"normal": {
|
"normal": {
|
||||||
|
|
@ -102,43 +101,44 @@ Multiple inheritance is supported with the `inherits` options like this:
|
||||||
### Flow mode
|
### Flow mode
|
||||||
|
|
||||||
The default input mode, called just flow, is based on common GUI
|
The default input mode, called just flow, is based on common GUI
|
||||||
programming editors. It most closely resembles Visual Studio Code, but
|
programming editors. It most closely resembles Visual Studio Code, but also
|
||||||
also takes some inspiration from Emacs and others. This mode focuses
|
takes some inspiration from Emacs and others. This mode focuses on powerful
|
||||||
on powerful multi cursor support with a find -> select -> modify
|
multi cursor support with a find -> select -> modify cycle style of
|
||||||
cycle style of editing.
|
editing.
|
||||||
|
|
||||||
See the `ctrl+f2` palette when flow mode is selected to see the full
|
See the `ctrl+f2` palette when flow mode is selected to see the full list
|
||||||
list of keybindings for this mode.
|
of keybindings for this mode.
|
||||||
|
|
||||||
|
|
||||||
### Vim mode
|
### Vim mode
|
||||||
|
|
||||||
The vim modes, shown as NORMAL, INSERT or VISUAL in the status bar,
|
The vim modes, shown as NORMAL, INSERT or VISUAL in the status bar, follow
|
||||||
follow the basic modal editing style of vim. The basics follow vim
|
the basic modal editing style of vim. The basics follow vim closely, but
|
||||||
closely, but more advanced vim functions (e.g. macros and registers)
|
more advanced vim functions (e.g. macros and registers) are not supported
|
||||||
are not supported (yet). Keybindings from flow mode that do not conflict
|
(yet). Keybindings from flow mode that do not conflict with vim keybindings
|
||||||
with vim keybindings also work in vim mode.
|
also work in vim mode.
|
||||||
|
|
||||||
|
|
||||||
### Helix mode
|
### Helix mode
|
||||||
|
|
||||||
The helix modes, shown as NOR, INS or SEL in the status bar, follow
|
The helix modes, shown as NOR, INS or SEL in the status bar, follow the
|
||||||
the basic modal editing style of helix. The basics are being adapted
|
basic modal editing style of helix. The basics are being adapted closely,
|
||||||
closely, more advanced functions (e.g. surround, macros, selections,
|
more advanced functions (e.g. surround, macros, selections, registers) are
|
||||||
registers) are not supported (yet). Usual keybinding with LSPs are
|
not supported (yet). Usual keybinding with LSPs are used for tasks like 'go
|
||||||
used for tasks like 'go to definition', 'go to reference' and
|
to definition', 'go to reference' and 'inline documentation' featuring
|
||||||
'inline documentation' featuring inline diagnostics. Keybindings
|
inline diagnostics. Keybindings from flow mode that do not conflict with
|
||||||
from flow mode that do not conflict with helix keybindings also work in
|
helix keybindings also work in helix mode.
|
||||||
helix mode.
|
|
||||||
|
|
||||||
(work in progress)
|
(work in progress)
|
||||||
|
|
||||||
## Mouse Commands
|
## Mouse Commands
|
||||||
|
|
||||||
Mouse commands are NOT rebindable and are not listed in the command palette.
|
Mouse commands are NOT rebindable and are not listed in the command
|
||||||
|
palette.
|
||||||
|
|
||||||
- Left Click =>
|
- Left Click =>
|
||||||
Clear all cursors and selections and the place cursor at the mouse pointer
|
Clear all cursors and selections and the place cursor at the mouse
|
||||||
|
pointer
|
||||||
|
|
||||||
- Double Left Click =>
|
- Double Left Click =>
|
||||||
Select word at mouse pointer
|
Select word at mouse pointer
|
||||||
|
|
@ -176,11 +176,10 @@ Mouse commands are NOT rebindable and are not listed in the command palette.
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Configuration is stored in the standard location
|
Configuration is stored in the standard location
|
||||||
`${XDG_CONFIG_HOME}/flow/config`. This is usually
|
`${XDG_CONFIG_HOME}/flow/config`. This is usually `~/.config/flow/config`.
|
||||||
`~/.config/flow/config`.
|
|
||||||
|
|
||||||
The default configuration will be written the first time
|
The default configuration will be written the first time Flow Control is
|
||||||
Flow Control is started and looks similar to this:
|
started and looks similar to this:
|
||||||
```
|
```
|
||||||
frame_rate 60
|
frame_rate 60
|
||||||
theme "default"
|
theme "default"
|
||||||
|
|
@ -197,23 +196,22 @@ animation_max_lag 150
|
||||||
|
|
||||||
Most of these options are fairly self explanatory.
|
Most of these options are fairly self explanatory.
|
||||||
|
|
||||||
`theme`, `input_mode` and `show_whitespace` are automatically
|
`theme`, `input_mode` and `show_whitespace` are automatically persisted
|
||||||
persisted when changed interactively with keybindings.
|
when changed interactively with keybindings.
|
||||||
|
|
||||||
`frame_rate` can be tuned to control the maximum number
|
`frame_rate` can be tuned to control the maximum number of frames rendered.
|
||||||
of frames rendered.
|
|
||||||
|
|
||||||
`animation_max_lag` controls the maximum amount of time allowed
|
`animation_max_lag` controls the maximum amount of time allowed for
|
||||||
for rendering scrolling animations. Set to 0 to disable scrolling
|
rendering scrolling animations. Set to 0 to disable scrolling animation
|
||||||
animation altogether.
|
altogether.
|
||||||
|
|
||||||
File types may be configured with the `Edit file type configuration` command.
|
File types may be configured with the `Edit file type configuration`
|
||||||
You can also create a new file type by adding a new `.conf` file to the
|
command. You can also create a new file type by adding a new `.conf` file
|
||||||
`file_type` directory. Have a look at an existing file type to see what options
|
to the `file_type` directory. Have a look at an existing file type to see
|
||||||
are available.
|
what options are available.
|
||||||
|
|
||||||
## Flags and options
|
## Flags and options
|
||||||
|
|
||||||
As every respectable terminal program, flow provide various invoking
|
As every respectable terminal program, flow provide various invoking
|
||||||
options that among others, will allow you to inspect various aspects of
|
options that among others, will allow you to inspect various aspects of the
|
||||||
the running session. Feel free to run `flow --help` to explore them.
|
running session. Feel free to run `flow --help` to explore them.
|
||||||
|
|
|
||||||
|
|
@ -296,6 +296,10 @@ pub const TabBar = struct {
|
||||||
if (!clipped)
|
if (!clipped)
|
||||||
if (tab.widget.walk(ctx, f)) return true;
|
if (tab.widget.walk(ctx, f)) return true;
|
||||||
}
|
}
|
||||||
|
for (self.splits_list.widgets.items) |*split_widget| if (split_widget.widget.dynamic_cast(WidgetList)) |split|
|
||||||
|
for (split.widgets.items) |*widget_state| if (widget_state.widget.dynamic_cast(drop_target.ButtonType)) |_| {
|
||||||
|
if (widget_state.widget.walk(ctx, f)) return true;
|
||||||
|
};
|
||||||
return f(ctx, self_w);
|
return f(ctx, self_w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue