readline.vim : Readline-style mappings for command-line mode
| script karma
Downloaded by 331
Comments, bugs, improvements
script versions (upload new version)
|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-line 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.
The word movement and deletion commands have different behavior 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 behavior for word movement and deletion commands.
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 with g:readline_ctrl_k)
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. Meta mappings using modifiers can be explicitly enabled using g:readline_meta. 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.
|Extract the files to ~/.vim using the `unzip' command:
$ unzip readline.zip -d ~/.vim
After doing that. Open Vim and run the `helptags' to generate tags for documentation:
If using a plug-in manager, refer to its documentation.
Click on the package to download.
ip used for rating: 22.214.171.124