refactor: remove unneeded sort_files_by_mtime() calls in Project
feat: add branch widget to default config
feat: add some whitespace to branch widget
This is my Zig text editor. It is under active development, but usually stable and is my daily driver for most things coding related.
https://github.com/neurocyte/flow/assets/1552770/97aae817-c209-4c08-bc65-0a0bf1f2d4c6
Binary release builds are found here: neurocyte/flow/releases
Fetch and install the latest release to /usr/local/bin
with the installation helper script:
curl -fsSL https://flow-control.dev/install | sh
Nightly binary builds are found here: neurocyte/flow-nightly/releases
Install latest nightly build and (optionally) specify the installation destination:
curl -fsSL https://flow-control.dev/install | sh -s -- --nightly --dest ~/.local/bin
See all avalable options for the installer script:
curl -fsSL https://flow-control.dev/install | sh -s -- --help
Or check your favorite local system package repository.
Make sure your system meets the requirements listed above.
Flow builds with zig 0.14.0 at this time. Build with:
zig build -Doptimize=ReleaseSafe
Zig will by default build a binary optimized for your specific CPU. If you get illegal instruction errors add -Dcpu=baseline
to the build command to produce a binary with generic CPU support.
Thanks to Zig you may also cross-compile from any host to pretty much any target. For example:
zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-windows --prefix zig-out/x86_64-windows
zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-macos-none --prefix zig-out/x86_64-macos
zig build -Doptimize=ReleaseSafe -Dtarget=aarch64-linux-musl --prefix zig-out/aarch64-linux
When cross-compiling zig will build a binary with generic CPU support.
The binary is:
zig-out/bin/flow
Place it in your path for convenient access:
sudo cp zig-out/bin/flow /usr/local/bin
Or if you prefer, let zig install it in your home directory:
zig build -Doptimize=ReleaseSafe --prefix ~/.local
Flow Control is a single statically linked binary. No further runtime files are required. You may install it on another system by simply copying the binary.
scp zig-out/bin/flow root@otherhost:/usr/local/bin
Configuration is mostly dynamically maintained with various commands in the UI.
It is stored under the standard user configuration path. Usually ~/.config/flow
on Linux. %APPDATA%\Roaming\flow on Windows. Somewhere magical on MacOS
Logs, traces and per-project most recently used file lists are stored in the
standard user application state directory. Usually ~/.local/state/flow
on
Linux and %APPDATA%\Roaming\flow on Windows.
Files to load may be specifed on the command line:
flow fileA.zig fileB.zig
The last file will be opened and the previous files will be placed in reverse order at the top of the recent files list. Switch to recent files with Ctrl-e.
Common target line specifiers are supported too:
flow file.txt:123
Or Vim style:
flow file.txt +123
Use the --language option to force the file type of a file:
flow --language bash ~/.bash_profile
Show supported language names with --list-languages
.
See flow --help
for the full list of command line options.
Press F2
to switch the current keybinding mode. (flow, vim, emacs, etc.)
Press ctrl+shift+p
or alt+x
to show the command palette.
Press ctrl+F2
to see a full list of all current keybindings and commands.
Run the Edit keybindings
command to save the current keybinding mode to a
file and open it for editing. Save your customized keybinds under a new name
in the same directory to create an entirely new keybinding mode. Keybinding
changes will take effect on restart.
Kitty, Ghostty and most other terminals have default keybindings that conflict with common editor commands. I highly recommend rebinding them to keys that are not generally used anywhere else.
For Kitty rebinding kitty_mod
is usually enough:
kitty_mod ctrl+alt
For Ghostty each conflicting binding has to be reconfigured individually.
Join our Discord server or use the discussions section here on GitHub to meet with other Flow users!