.bimrc support added. Unlick traditional vim, it's not settings, but quick commands you can use in documents. README.md has details.
This commit is contained in:
@@ -43,11 +43,34 @@ mode and supports:
|
||||
`4x`, `5w`, `5dw`, `3rX`, and `2s`
|
||||
- `Esc` return to command mode
|
||||
- `Ctrl+G` show file, modified state, line, and column info
|
||||
- `,name` then `Enter` run a command defined in `~/.bimrc` and insert its output
|
||||
- `: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.
|
||||
|
||||
## `~/.bimrc` commands
|
||||
|
||||
`bim` can load simple command shortcuts from `~/.bimrc`. Each non-empty,
|
||||
non-comment line is a command name, an equals sign, and the shell command to run:
|
||||
|
||||
```text
|
||||
date=date +'%A, %B %d, %Y'
|
||||
uuid=uuidgen
|
||||
```
|
||||
|
||||
In command mode, type `,date` then `Enter` to run the configured `date` command
|
||||
and insert its standard output at the cursor. `Esc` cancels a pending command,
|
||||
and Backspace edits it before it runs. `bim` appends one space after inserted
|
||||
command output so short snippets are ready for continued typing.
|
||||
|
||||
Commands are not run when `bim` starts. They only run when invoked explicitly
|
||||
with `,name`. `bim` does not source `~/.bimrc`; it parses command definitions as
|
||||
data. For safety, `~/.bimrc` must be a regular file owned by the current user,
|
||||
must not be a symlink, and must not be writable by group or other users.
|
||||
Command names may contain letters, digits, underscores, and hyphens, and must
|
||||
start with a letter or underscore.
|
||||
|
||||
Run it with:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user