Ⅰ. 插件描述
Vim motions on speed!Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'supasorn/vim-easymotion-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'supasorn/vim-easymotion-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'supasorn/vim-easymotion-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/supasorn/vim-easymotion
Ⅳ. 文档说明
# Modifications to supasorn's fork
- Delete lines (triggered by normal command
dl) now preserve current position for easier paste. - Added inline parameter in easymotion function, for remap normal
fandF, so they will work in one line mode. When usef<char>if there is only one<char>in the line it's behavior will just like normalf, if there are multiple<char>s in the single line, it will show prompt for user.
Modifications to Lokaltog's EasyMotion
- Use one - two character key jump. Display two keys if one-character key is not enough, so you can see what two keys to type without waiting after pressing the first key.
- Added forward-backward search (bidirectional) search. You can jump forward or backward at the same time.
<Leader>s. One useful trick is to mapnmap <SPACE> <leader>sandvmap <SPACE> <leader>sto use space bar instead and save one keystroke! - Added SelectLines function which allows you to select any range of lines using two consecutive easymotion calls. Default mappings are
cl, dl, vl, yl. To yank a single line you can either type the same character(s) twice, or use '.' character. E.g.vlb.will select the line with character 'b'. Note: to promote good Vim habits, you should learn standard movement commands like}}, vi(, va(, %, ][, ]], [(, etc.before resorting to this function. - (Experimental) Added SelectPhrase function which allows you to make selection between any two characters. Default mapping are
cp, dp, vp, yp. Example usage: typevpthen press two input characters. Now the two input characters will be highlight on the same screen, and you can then type two combos to make selection.
Animated demonstration
Two-key combo

Select lines using vl

Yank lines using yl. You can copy lines without moving cursor back and forth between line you want to yank and line you want to paste.

This is an alpha version, which breaks multi-byte support, and others.
Introduction
EasyMotion provides a much simpler way to use some motions in vim. It
takes the <number> out of <number>w or <number>f{char} by
highlighting all possible choices and allowing you to press one key to
jump directly to the target.
When one of the available motions is triggered, all visible text
preceding or following the cursor is faded, and motion targets are
highlighted.
EasyMotion is triggered by one of the provided mappings.
Important notes about the default bindings
**The default leader has been changed to <Leader><Leader> to avoid
conflicts with other plugins you may have installed.** This can easily be
changed back to pre-1.3 behavior by rebinding the leader in your vimrc:
let g:EasyMotion_leader_key = '<Leader>'
All motions are now triggered with <Leader><Leader> by default, e.g.<Leader><Leader>t, <Leader><Leader>gE.
Usage example
Type <Leader><Leader>w to trigger the word motion w. When the motion is
triggered, the text is updated (no braces are actually added, the text
is highlighted in red by default):
<cursor>Lorem {a}psum {b}olor {c}it {d}met.
Press c to jump to the beginning of the word "sit":
Lorem ipsum dolor <cursor>sit amet.
Similarly, if you're looking for an "o", you can use the f motion.
Type <Leader><Leader>fo, and all "o" characters are highlighted:
<cursor>L{a}rem ipsum d{b}l{c}r sit amet.
Press b to jump to the second "o":
Lorem ipsum d<cursor>olor sit amet.
Jeffrey Way of Nettuts+ has also [written
a tutorial](http://net.tutsplus.com/tutorials/other/vim-essential-plugin-easymotion/)
about EasyMotion.
Animated demonstration
