Skip to content
/ bo Public

My personal prose editor with vim-like navigation.

License

Notifications You must be signed in to change notification settings

brouberol/bo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bo

crates.io Tests Coverage rustdoc

My (WIP) personal text editor for prose.

bo.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.

Installation

You can fetch the latest bo release from the Github release page, or compile and install it by running

$ cargo install bo-bin

Note: While the crates is named bo-bin (as bo was already taken), the binary name is bo.

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

Development documentation

The rustdoc documentation is hosted on Github Pages.

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.