Binary editor written in Go
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.
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.
brew install itchyny/tap/bed
go get github.com/itchyny/bed/cmd/bed
- 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 #1 for roadmap.
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
- Quit and save
:quit
,:qall
,:write
,:wq
,:xit
,:xall
,:cquit
- Window operations
:wincmd [nolhkjtbpKJHL]
,<C-w>[nolhkjtbpKJHL]
- Mode operations
i
,I
,a
,A
,R
,<ESC>
,v
- Undo and redo
:undo
,u
,:redo
,<C-r>
- Moving cursor
:{count}
,:{count}goto
,:{count}%
- Searching
/
,?
,n
,N
,<C-c>
(to abort)
Report bug at Issues・itchyny/bed - GitHub.
itchyny (https://github.com/itchyny)
This software is released under the MIT License, see LICENSE.