Add readline and editline config files
Enable vi mode in readline and editline configs.
This commit is contained in:
parent
4f08d9ee4b
commit
78004d8067
@ -3,3 +3,6 @@
|
||||
- tic xterm-256color.terminfo
|
||||
- tic screen-256color.terminfo
|
||||
- tic tmux-256color.terminfo
|
||||
- symlink:
|
||||
- {src: inputrc, dst: ~/.inputrc}
|
||||
- {src: editrc, dst: ~/.editrc}
|
||||
|
14
README.md
14
README.md
@ -17,5 +17,19 @@ To compile a [terminfo][terminfo] database for the current user, output to
|
||||
$ tic xterm-256color.terminfo
|
||||
```
|
||||
|
||||
## readline
|
||||
|
||||
Enable vi mode in tools which use [readline][readline] e.g. [gdb][gdb], setup
|
||||
vim like mappings for navigation. Settings are placed in `~/.inputrc`.
|
||||
|
||||
## editline
|
||||
|
||||
Enable vi mode in tools which use [editline][editline] e.g. [lldb][lldb].
|
||||
Settings are places in `~/.editrc`.
|
||||
|
||||
[terminfo]: https://linux.die.net/man/5/terminfo
|
||||
[tic]: https://linux.die.net/man/1/tic
|
||||
[readline]: https://linux.die.net/man/3/readline
|
||||
[gdb]: https://www.gnu.org/software/gdb
|
||||
[editline]: https://linux.die.net/man/3/editline
|
||||
[lldb]: https://lldb.llvm.org
|
||||
|
13
inputrc
Normal file
13
inputrc
Normal file
@ -0,0 +1,13 @@
|
||||
# Enable vi mode
|
||||
set editing-mode vi
|
||||
|
||||
# Normal mode mappings
|
||||
set keymap vi-command
|
||||
"gg": beginning-of-history
|
||||
"G": end-of-history
|
||||
|
||||
# Insert mode mappings
|
||||
set keymap vi-insert
|
||||
"\C-[": vi-movement-mode
|
||||
"\C-p": history-search-backward
|
||||
"\C-n": history-search-forward
|
Reference in New Issue
Block a user