2011-03-31 02:23:06 -04:00
|
|
|
# Introduction
|
2011-03-28 06:54:03 -04:00
|
|
|
|
2011-06-01 04:14:20 -04:00
|
|
|
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
|
2011-03-28 06:54:03 -04:00
|
|
|
jump directly to the target.
|
|
|
|
|
2011-06-01 04:14:20 -04:00
|
|
|
When one of the available motions is triggered, all visible text
|
|
|
|
preceding or following the cursor is faded, and motion targets are
|
2011-03-28 06:54:03 -04:00
|
|
|
highlighted.
|
|
|
|
|
2011-03-31 02:23:06 -04:00
|
|
|
EasyMotion is triggered by one of the provided mappings.
|
2011-03-28 06:54:03 -04:00
|
|
|
|
2011-04-07 04:29:03 -04:00
|
|
|
# Important notes about the default bindings
|
|
|
|
|
2011-06-01 04:14:20 -04:00
|
|
|
The default leader has been changed to `<Leader>e` to avoid conflicts
|
|
|
|
with other plugins you may have installed. This can easily be changed
|
|
|
|
back by rebinding the leader in your vimrc:
|
2011-04-07 04:29:03 -04:00
|
|
|
|
2011-06-01 04:14:20 -04:00
|
|
|
let g:EasyMotion_leader_key = '<Leader>'
|
2011-04-07 04:29:03 -04:00
|
|
|
|
2011-06-01 04:14:20 -04:00
|
|
|
All motions are now triggered with `<Leader>e` by default, e.g.
|
|
|
|
`<Leader>et`, `<Leader>egE`.
|
2011-04-07 04:29:03 -04:00
|
|
|
|
2011-03-31 02:23:06 -04:00
|
|
|
## Usage example
|
2011-03-28 06:54:03 -04:00
|
|
|
|
2011-06-01 04:14:20 -04:00
|
|
|
Type `<Leader>ew` to trigger the word motion `w`. When the motion is
|
|
|
|
triggered, the text is updated (no braces are actually added, the text
|
2011-03-31 02:23:06 -04:00
|
|
|
is highlighted in red by default):
|
2011-03-28 06:54:03 -04:00
|
|
|
|
|
|
|
<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.
|
|
|
|
|
2011-06-01 04:14:20 -04:00
|
|
|
Similarly, if you're looking for an "o", you can use the `f` motion.
|
|
|
|
Type `<Leader>efo`, and all "o" characters are highlighted:
|
2011-03-31 02:23:06 -04:00
|
|
|
|
|
|
|
<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.
|
|
|
|
|
2011-06-01 04:14:20 -04:00
|
|
|
Jeffrey Way of Nettuts+ has also [written
|
|
|
|
a tutorial](http://net.tutsplus.com/tutorials/other/vim-essential-plugin-easymotion/)
|
2011-03-31 02:23:06 -04:00
|
|
|
about EasyMotion.
|
2011-03-28 06:54:03 -04:00
|
|
|
|
|
|
|
## Animated demonstration
|
|
|
|
|
|
|
|
![Animated demonstration](http://oi54.tinypic.com/2yysefm.jpg)
|