Skip to content
Binary editor written in Go
Go Makefile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows setup GitHub Actions Sep 8, 2019
buffer update test case for Buffer#ReplaceIn Sep 2, 2018
cmd/bed merge run.go into main.go Jan 18, 2019
cmdline parse bang and remove ForceQuit event Sep 8, 2019
editor fix ZQ to quit discarding the changes (close #28) Sep 10, 2019
event parse bang and remove ForceQuit event Sep 8, 2019
history add go vet in make lint and fix errors Mar 26, 2019
key fix ZQ to quit discarding the changes (close #28) Sep 10, 2019
layout use %#v instead of %+v for layout tests Apr 7, 2018
mathutil rename util package to mathutil package Mar 26, 2018
mode add visual mode and define key mappings Mar 29, 2018
searcher
state store previous mode on switching the modes Apr 7, 2018
tui add mutex to Tui to avoid race of ui.mode Jan 25, 2019
window parse bang and remove ForceQuit event Sep 8, 2019
.appveyor.yml migrate to Go modules on AppVeyor Mar 26, 2019
.gitignore change executable output to the root directory of the repository Aug 30, 2019
.travis.yml use Go 1.12.x on TravisCI Mar 26, 2019
LICENSE update copyright year in the LICENSE Jan 18, 2019
Makefile change executable output to the root directory of the repository Aug 30, 2019
README.md list basic commands and keyboard shortcuts in README.md Sep 8, 2019
go.mod migrate to go modules Mar 26, 2019
go.sum migrate to go modules Mar 26, 2019

README.md

bed

Binary editor written in Go

Screenshot

bed command screenshot

Why?

Why not? Programming is so fun!

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.

Installation

 $ go get -u github.com/itchyny/bed/cmd/bed

Features

  • Basic editing: inserting, replacing, deleting bytes
  • Support for large files
  • Window splitting
  • Partial writing
  • Text searching

Note that this software is still in its early stage of development. Please refer to https://github.com/itchyny/bed/issues/1 for roadmap.

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
  • Quit and save
    • :quit, :qall, :write, :wq, :xit, :xall
  • Window operations
    • :wincmd [nlhkjtbpKJHL], <C-w>[nlhkjtbpKJHL]
  • Mode operations
    • i, I, a, A, R, <ESC>, v
  • Undo and redo
    • :undo, u, :redo, <C-r>
  • Searching
    • /, ?, n, N, <C-c> (to abort)

Bug Tracker

Report bug at Issues・itchyny/bed - GitHub.

Author

itchyny (https://github.com/itchyny)

License

This software is released under the MIT License, see LICENSE.

You can’t perform that action at this time.