readline.vim : Readline-style bindings for command mode
script karma |
Rating 9/3,
Downloaded by 118
|
Comments, bugs, improvements
|
Vim wiki
|
created by |
Elias Åström |
|
script type |
utility |
|
description |
Readline is a library used for implementing line editing across many command-line tools (including `bash` and other shells and interpreters). Readline ships with a default set of key-bindings that you are probably already familiar with. The Readline default bindings is a mixture of traditional UNIX and EMACS bindings.
This plugins implements a subset of Readline's default keyboard commands to Vim's command-mode. Mappings available include deletion and navigation by words and other useful stuff.
What makes this plugin different from similar plugins is that it implements a larger subset of the Readline mappings, and that it does a better job of mimicking the Readline behavior for each command.
Following is a summary of the mappings implemented by this plugin:
- C-b => Move backward
- C-f => Move forward
- M-b => Move one word backward
- M-f => Move one word forward
- C-a => Move to start of line
- C-e => Move to end of line
- C-d => Delete character
- M-Backspace => Rubout word
- M-d => Delete word
- C-w => Rubout space-delimited word
- C-u, C-x Backspace => Delete to start of line
- C-k => Deleted to end of line (can be disabled)
- C-y => Yank (paste) previously deleted text
- C-t => Transpose characters
- M-t => Transpose words
- M-u => Make word UPPERCASE
- M-l => Make word lowercase
- M-c => Make word Capitalized
- M-# => Comment out and execute the command-line
- M-=, M-? => List possible completions
- M-* => Insert possible completions
- C-x C-e => Open command-line window (like default Vim C-f)
The word boundaries for movement and deletion differ between Vim and Readline. The biggest difference is that in Readline punctuation is always skipped when searching for a word boundary. Another difference is that _ (underscore) is treated as a word delimiter. This plugin implements the Readline behaivor for word movement and deletion commands.
This plugin does not use the Meta-key directly, because it causes conflicts with inserting accented characters on some keyboard layouts. Instead Meta-key mappings can only be accessed by prefixing the keys with Esc. Most terminal emulators can be configured to send keys prefixed with Esc when the Alt modifier is held.
Follow development at https://www.github.com/ryvnf/readline.vim. |
|
install details |
Extract the zip file into your ~/.vim directory (vimfiles on Windows):
<in unix shell>
$ unzip <zip-folder> ~/.vim/
Run helptags command so you can access help page using `:h readline`:
<in vim>
:helptags ~/.vim/doc |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 23.20.245.192
|