Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itchyny/bed
Binary editor written in Go
https://github.com/itchyny/bed
binary golang hex-editor
Last synced: 1 day ago
JSON representation
Binary editor written in Go
- Host: GitHub
- URL: https://github.com/itchyny/bed
- Owner: itchyny
- License: mit
- Created: 2018-04-09T22:06:07.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T11:25:25.000Z (about 1 month ago)
- Last Synced: 2024-10-29T13:22:00.532Z (about 1 month ago)
- Topics: binary, golang, hex-editor
- Language: Go
- Size: 672 KB
- Stars: 1,272
- Watchers: 21
- Forks: 46
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - bed
- awesome-go - bed - A Vim-like binary editor written in Go. Stars:`1.3K`. (Utilities / Utility/Miscellaneous)
README
# bed
[![CI Status](https://github.com/itchyny/bed/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/itchyny/bed/actions?query=branch:main)
[![Go Report Card](https://goreportcard.com/badge/github.com/itchyny/bed)](https://goreportcard.com/report/github.com/itchyny/bed)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/itchyny/bed/blob/main/LICENSE)
[![release](https://img.shields.io/github/release/itchyny/bed/all.svg)](https://github.com/itchyny/bed/releases)
[![pkg.go.dev](https://pkg.go.dev/badge/github.com/itchyny/bed)](https://pkg.go.dev/github.com/itchyny/bed)Binary editor written in Go
## Screenshot
![bed command screenshot](https://user-images.githubusercontent.com/375258/38499347-2f71306c-3c42-11e8-926e-1782b0bc73f3.png)## 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.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```sh
brew install bed
```### Build from source
```bash
go install github.com/itchyny/bed/cmd/bed@latest
```## Features
- Basic byte editing
- Large file support
- Command line interface
- Window splitting
- Partial writing
- Text searching
- Undo and redo### Commands and keyboard shortcuts
This binary editor is influenced by the Vim editor.- File operations
- `:edit`, `:enew`, `:new`, `:vnew`, `:only`
- Current working directory
- `:cd`, `:chdir`, `:pwd`
- Quit and save
- `:quit`, `ZQ`, `:qall`, `:write`,
`:wq`, `ZZ`, `:xit`, `:xall`, `:cquit`
- Window operations
- `:wincmd [nohjkltbpHJKL]`, `[nohjkltbpHJKL]`
- Cursor motions
- `h`, `j`, `k`, `l`, `w`, `b`, `^`, `0`, `$`,
``, ``, ``, ``,
`G`, `gg`, `:{count}`, `:{count}goto`, `:{count}%`,
`H`, `M`, `L`, `zt`, `zz`, `z.`, `zb`, `z-`,
`` (toggle focus between hex and text views)
- Mode operations
- `i`, `I`, `a`, `A`, `v`, `r`, `R`, ``
- 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`, ``
- Search
- `/`, `?`, `n`, `N`, `` (abort)## Bug Tracker
Report bug at [Issues・itchyny/bed - GitHub](https://github.com/itchyny/bed/issues).## Author
itchyny ()## License
This software is released under the MIT License, see LICENSE.