From e1c25e8c1b44291d334370f0accfb7f991db5463 Mon Sep 17 00:00:00 2001 From: itchyny Date: Tue, 15 Oct 2024 22:54:56 +0900 Subject: [PATCH] improve README.md for motivation and features --- README.md | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index c295819..95005e9 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,14 @@ Binary editor written in Go ## Screenshot ![bed command screenshot](https://user-images.githubusercontent.com/375258/38499347-2f71306c-3c42-11e8-926e-1782b0bc73f3.png) -## Why? -Why not? Programming is so fun! +## Motivation +I wanted to create a binary editor with Vim-like user interface, which runs in terminals, fast, and is portable. +I have always been interested in various binary formats and I wanted to create my own editor to handle them. +I also wanted to learn how a binary editor can handle large files and allow users to edit them interactively. -I learned so much while creating this editor; handling of file pointers, what the saying details should depend on abstractions mean, how to mock file system for tests in Go language, how to solve deadlock or race conditions between goroutines and many other things. - -After all, creating by yourself is the best way to learn how it works. - -#### Okay, but why? -I actually want a binary editor with Vim-like user interface, which runs in terminals, portable, fast and with window splitting feature. -I think I started coding for what I want before doing research on existing editors. +While creating this binary editor, I leaned a lot about programming in Go language. +I spent a lot of time writing the core logic of buffer implementation of the editor. +It was a great learning experience for me and a lot of fun. ## Installation ### Homebrew @@ -33,35 +31,42 @@ go install github.com/itchyny/bed/cmd/bed@latest ``` ## Features -- Basic editing: inserting, replacing, deleting bytes -- Support for large files +- Basic byte editing +- Large file support +- Command line interface - Window splitting - Partial writing - Text searching - -Note that this software is still in its early stage of development. -Please refer to [#1](https://github.com/itchyny/bed/issues/1) for roadmap. +- Undo and redo ### Commands and keyboard shortcuts This binary editor is influenced by the Vim editor. -So if you have experience with Vim, you will notice most of basic operations of Vim are supported with this binary editor too. - File operations - `:edit`, `:enew`, `:new`, `:vnew`, `:only` -- Current working directory +- Change working directory - `:cd`, `:chdir`, `:pwd` - Quit and save - - `:quit`, `:qall`, `:write`, `:wq`, `:xit`, `:xall`, `:cquit` + - `:quit`, `ZQ`, `:qall`, `:write`, + `:wq`, `ZZ`, `:xit`, `:xall`, `:cquit` - Window operations - `:wincmd [nolhkjtbpKJHL]`, `[nolhkjtbpKJHL]` +- Cursor motions + - `h`, `j`, `k`, `l`, `w`, `b`, `^`, `0`, `$`, + ``, ``, ``, `` + `G`, `gg`, `:{count}`, `:{count}goto`, `:{count}%`, + `H`, `M`, `L`, `zt`, `zz`, `z.`, `zb`, `z-` - Mode operations - - `i`, `I`, `a`, `A`, `R`, ``, `v` + - `i`, `I`, `a`, `A`, `R`, `r`, `v`, ``, + `` (toggle focus between hex and text views) +- Inspect and edit + - `gb` (binary), `gd` (decimal), `x` (delete), `X` (delete backward), + `d` (delete selection), `y` (copy selection), `p`, `P` (paste), + `<` (left shift), `>` (right shift), `` (increment), `` (decrement) - Undo and redo - `:undo`, `u`, `:redo`, `` -- Moving cursor - - `:{count}`, `:{count}goto`, `:{count}%` -- Searching - - `/`, `?`, `n`, `N`, `` (to abort) +- Search + - `/`, `?`, `n`, `N`, `` (abort) ## Bug Tracker Report bug at [Issues・itchyny/bed - GitHub](https://github.com/itchyny/bed/issues).