45 lines
1.4 KiB
Markdown
45 lines
1.4 KiB
Markdown
# bim
|
|
|
|
`bim` is a tiny Vim-like editor written in Bash.
|
|
|
|
This is an early prototype, not a full Vim replacement. It starts in command
|
|
mode and supports:
|
|
|
|
- `i` insert before the cursor
|
|
- `a` append after the cursor
|
|
- `I` insert at the beginning of the line
|
|
- `A` append at the end of the line
|
|
- arrow keys, plus `h`, `j`, `k`, `l`
|
|
- `w` move forward by word
|
|
- `b` move backward by word
|
|
- `e` move to the end of the current or next word
|
|
- `x` delete the character under the cursor
|
|
- `dd` delete the current line
|
|
- `d$` or `D` delete from the cursor to the end of the line
|
|
- `dw` delete forward by word
|
|
- `db` delete backward by word
|
|
- `cw` change word
|
|
- `cc` change the current line
|
|
- `C` change from the cursor to the end of the line
|
|
- `s` substitute the character under the cursor
|
|
- `r` replace the character under the cursor
|
|
- `yy` yank the current line
|
|
- `p` paste the yanked or deleted line below the cursor
|
|
- `o` open a new line below and enter insert mode
|
|
- `O` open a new line above and enter insert mode
|
|
- `u` undo the last change
|
|
- numeric prefixes for common commands, such as `2dd`, `20yy`, `3p`, `5j`,
|
|
`4x`, `5w`, `5dw`, `3rX`, and `2s`
|
|
- `Esc` return to command mode
|
|
- `Ctrl+G` show file, modified state, line, and column info
|
|
- `:w`, `:w path`, `:q`, `:q!`, `:wq`, and `:wq path`
|
|
|
|
There is no persistent ruler/status line. The bottom line is used only for
|
|
commands, messages, and explicit `Ctrl+G` file info.
|
|
|
|
Run it with:
|
|
|
|
```bash
|
|
./bim path/to/file
|
|
```
|