Git Product home page Git Product logo

flow's Introduction

Flow Control: a programmer's text editor

This is my Zig text editor. It is very much a work-in-progress, but far enough along that I am daily driving it.

2024-02-15_15-38-00.-.flow.announcement.mp4

Requirements

  • A modern terminal with 24bit color and kitty keyboard protocol support (kitty and ghostty are the only recommended terminals at this time)
  • NerdFonts support
  • Linux or MacOS (help porting to *BSD or Windows is welcome!)
  • A UTF-8 locale (very important!)

Building

Make sure your system meets the requirements listed above.

Flow tracks zig master most of the time. Build with:

zig build -Doptimize=ReleaseFast

Sometime zig master may introduce breaking changes and Flow may take a few days to catch up. In that case there is a simple zig wrapper script provided that will download and build with the last known compatible version of zig. The version is stored in build.zig.version.

Build with the zig wrapper:

./zig build -Doptimize=ReleaseFast

The zig wrapper places the downloaded zig compiler in the .cache directory and does not touch your system. It requires bash, curl and jq to run.

Run with:

zig-out/bin/flow

Place it in your path for convenient access.

See --help for full command line.

MacOS

On MacOS you will need to link Flow against a MacOS build of notcurses 3.0.9. This is easiest with brew:

brew install notcurses
zig build -Duse_system_notcurses=true --search-prefix /usr/local

Terminal configuration

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.

Features

  • fast TUI interface. no user interaction should take longer than one frame (6ms) (even debug builds)
  • tree sitter based syntax highlighting
  • multi cursor editing support
  • first class mouse support (yes, even with a scrollbar that actually works properly!)
  • vscode compatible keybindings (thanks to kitty keyboard protocol)
  • vim compatible keybindings (at least the basics, more to come)
  • good unicode support
  • hybrid rope/piece-table buffer for fast loading, saving and editing with hundreds of cursors
  • theme support (compatible with vscode themes via the flow-themes project)
  • infinite undo/redo (at least until you run out of ram)
  • stuff I've forgotten to mention...

Features in progress

  • LSP support for linting and navigating
  • find in files
  • multi tty support (shared editor sessions across multiple ttys)
  • command palette
  • completion UI
  • persistent undo/redo

Features planned for the future

  • multi host editing
  • multi user editing

Community

Discord

Join our Discord server or use the discussions section here on GitHub to meet with other Flow users!

flow's People

Contributors

neurocyte avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.