yankmatches


Ⅰ. 插件描述

Damian Conway's yankmatches plugin for vim

Ⅱ. 基本信息

创建日期:  2015-09-19
使用用户:  1
Github星:  5
插件作者:  Joshua Steele

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# yankmatches.vim

This is my fork of Damian Conway's yankmatches.vim. I've made some minor customizations as specified below. I am mainly storing the plugin in my own repo so that I can manage its installation with Vundle.

Customized Key Mappings

I don't like the delay after pressing y for doing regular yanks. Therefore, I've changed the default ym mapping to YM. The inverse of this is changed from YM to YI.

nmap <silent> dm  :     call ForAllMatches('delete', {})<CR>
nmap <silent> DM  :     call ForAllMatches('delete', {'inverse':1})<CR>
nmap <silent> YM  :     call ForAllMatches('yank',   {})<CR>
nmap <silent> YI  :     call ForAllMatches('yank',   {'inverse':1})<CR>
vmap <silent> dm  :<C-U>call ForAllMatches('delete', {'visual':1})<CR>
vmap <silent> DM  :<C-U>call ForAllMatches('delete', {'visual':1, 'inverse':1})<CR>
vmap <silent> YM  :<C-U>call ForAllMatches('yank',   {'visual':1})<CR>
vmap <silent> YI  :<C-U>call ForAllMatches('yank',   {'visual':1, 'inverse':1})<CR>

Configuration Options

Override the Destination Default Destination Register

By default, this plugin will save your matched text in the register defined by
the clipboard setting, or if that isn't defined it will save in the "
register.

However, It is possible that a user may want to use a different register for
this plugin.

To configure the destination register to the a register for example:

let g:YankMatches#ClipboardRegister='a'

添加新评论