69a03099 |
## Background
[Readline][] is a library that provides line-editing for interactive
command-line programs. It is used in a great many places, including shells such
as [Bash][] (where it originated) and [REPL][]s such as [Python][] or
[Octave][]. Using [`rlwrap`][], Readline can even be used with programs that
doesn't have built in support for it, such as Matlab (as in `lrwrap -a matlab
-nodesktop -nosplash`). These factors make it fairly ubiquitous.
Readline can be configured with an `inputrc` file, usually placed at
`~/.inputrc`.
Readline uses [Emacs][]-like key bindings by default. If you're a Vim fan
though, you probably use its `vi` mode, activated by `set editing-mode vi` in
the configuration or through some mechanism in the containing program, such as
Bash's `set -o vi`.
If you *are* a Vim fan though, this has the potential of landing you in a sort
of [uncanny valley][] since (Readline's) `vi` (mode) does not include the many
improvements contained in Vim that you have come to rely on, mainly [text
objects][].
|
866cd07a |
## Similar projects
- [`bash-surround`](https://github.com/liloman/bash-surround)
Defines the macros manually and therefore "only" provides 234 of them,
missing some functionality.
The instructions are Bash centric, although it uses general Readline
macros.
- [Athame](https://github.com/ardagnir/athame)
Patches Readline to route keystrokes through an actual Vim process. Also
provides patches for [Zsh][]. This means that whatever your local Vim
supports, Athame supports (including plugins)!
Can be a little unreliable if your local Vim has a ton of plugins,
especially if they interact with the terminal in non-obvious ways.
- [`readline-vim`](https://github.com/thlorenz/readline-vim)
Exclusive to [Node.js][] [`readline`][Node.js `readline`] and only defines
`vi` bindings, not Vim.
[Node.js]: https://nodejs.org
[Node.js `readline`]: https://nodejs.org/api/readline.html#readline_readline
[Zsh]: https://en.wikipedia.org/wiki/Zsh
|