bo-bin

Crates.iobo-bin
lib.rsbo-bin
version0.4.0
sourcesrc
created_at2022-05-23 09:53:26.579408
updated_at2022-05-23 09:53:26.579408
descriptionA minimalistic text editor with vim-like navigation capabilities
homepage
repositoryhttps://github.com/brouberol/bo
max_upload_size
id591688
size191,840
Balthazar Rouberol (brouberol)

documentation

README

bo

Tests Coverage

My (WIP) personal text editor for prose.

https://user-images.githubusercontent.com/480131/131999617-61acc5a2-4055-4cd1-9da1-134ee9e075b4.mp4

Why?

The goals for bo are the following:

  • write a non trivial application in Rust for the first time
  • create a text editor extremely tailored to my personal tastes, only implementing the Vim navigation features I like and use
  • make it non configurable

Having a good text editor is paramount for a software engineer, but the definition of good really varies depending on the context. I do enjoy Visual Studio for its rich ecosystem, I enjoy Sublime Text for its extreme snappiness, and I enjoy vim for its ubiquitousness. I tend to favour an editor with plugins/linters/autocompletion when I'm developing code, but when I'm writing prose (blogposts, book chapters...), I would like to use an editor that is as simple as possible and "works" for me, without giving me the opportunity of getting lost in configuration options.

So, something like Left, but with vim-like navigation commands.

Roadmap

Navigation

  • Navigation with h, j, k, l
  • Next/previous paragraph (}, {)
  • Next/previous word (w, b)
  • First/last line in document (g, G)
  • First/last character in the line (0, $)
  • Screen navigation (H, M, L)
  • First non whitespace character in the line (^)
  • Support for multi-character commands (e.g. 2j, 3}, ...)
  • Go to n% in the file (%)
  • Search text and navigate through matches
  • Move cursor by left clicking
  • Go to matching symbol, bracket, quote, etc
  • Support multiline goto-matching-symbol

Editing

  • Create a new file
  • Open an existing file
  • Save file w
  • Rename file w file name
  • Insert character under the cursor
  • block (word, paragraph, line, etc) with both d and c
  • delete a line with dd
  • yank/paste a block
  • insert newline before/after (o, O)
  • Replace current character (r)
  • Replace search matches
  • Remove trailing space at save
  • Remove current character

Options

  • toggle line numbers
  • toggle word count stats
  • toggle line wrapping

UX

  • Display help
  • Save session file with last known cursor position
  • Restore unsaved edits by regularly saving to a hidden swap file
  • Command history, browsable with arrows
  • Support Unicode characters
  • Redraw rows when the terminal size changes

Long shot

  • Multiline edition support
  • undo/redo
  • Tab navigation
  • Fuzzy file finder

Inspiration

I got the inspiration for bo by reading about antirez's editor kilo, and am wildly basing my work on the excellent blogpost series by Philipp Flenker.

It is called bo because I've recently turned 30.

Commit count: 286

cargo fmt