readline.vim


Ⅰ. 插件描述

Readline emulation for command-line mode

Ⅱ. 基本信息

创建日期:  2017-11-30
使用用户:  2
Github星:  52
插件作者:  Elias Åström

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'ryvnf/readline-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'ryvnf/readline-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'ryvnf/readline-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/ryvnf/readline.vim

Ⅳ. 文档说明

readline.vim

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.

Features

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.

Examples

Following are a few examples illustrating when this plugin can be useful. In
each example _ is used to indicate the current cursor position.

1

Deleting last two elements of path argument to :cd.

Command lineCommand
:cd path/to/dir/_M-Backspace
:cd path/to/_M-Backspace
:cd path/_

2

Deleting path argument to :edit completely.

Command lineCommand
:edit path/to/file_C-w
:edit _

3

Adding ! to :edit command.

Command lineCommand
:edit path/to/file_C-a
:_edit path/to/fileM-f
:edit_ path/to/file!
:edit!_ path/to/file

More documentation

See the documentation for documentation of all mappings
implemented by this plugin.

添加新评论