Update docs

This commit is contained in:
Kim Silkebækken 2011-06-01 10:14:20 +02:00
parent 26c84b7474
commit b8370708ea
2 changed files with 49 additions and 39 deletions

View File

@ -1,37 +1,31 @@
# 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
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
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 bindings may conflict with other plugins you have installed,
e.g. Command-T. Please read the docs about the default bindings, it's
easy to rebind the EasyMotion keys or rebind the leader key in order to
"namespace" the plugin.
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:
You can rebind the leader key in your vimrc:
let g:EasyMotion_leader_key = '<Leader>'
let g:EasyMotion_leader_key = '<Leader>m'
All the motions will now be triggered with `<Leader>m` first, e.g.
`<Leader>mt`, `<Leader>mgE`. You can also remap single motions:
let g:EasyMotion_mapping_t = '_t'
let g:EasyMotion_mapping_gE = '_gE'
All motions are now triggered with `<Leader>e` by default, e.g.
`<Leader>et`, `<Leader>egE`.
## Usage example
Type `<Leader>w` to trigger the word motion `w`. When the motion is
triggered, the text is updated (no braces are actually added, the text
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
is highlighted in red by default):
<cursor>Lorem {a}psum {b}olor {c}it {d}met.
@ -40,8 +34,8 @@ 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>fo`, and all "o" characters are highlighted:
Similarly, if you're looking for an "o", you can use the `f` motion.
Type `<Leader>efo`, and all "o" characters are highlighted:
<cursor>L{a}rem ipsum d{b}l{c}r sit amet.
@ -49,8 +43,8 @@ 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/)
Jeffrey Way of Nettuts+ has also [written
a tutorial](http://net.tutsplus.com/tutorials/other/vim-essential-plugin-easymotion/)
about EasyMotion.
## Animated demonstration

View File

@ -24,6 +24,8 @@ CONTENTS *easymotion-contents*
4.4 EasyMotion_grouping ............ |EasyMotion_grouping|
4.5 Custom highlighting ............ |easymotion-custom-hl|
4.6 Custom mappings ................ |easymotion-custom-mappings|
4.6.1 Leader key ............... |easymotion-leader-key|
4.6.2 Custom keys .............. |easymotion-custom-keys|
5. License ............................ |easymotion-license|
6. Known bugs ......................... |easymotion-known-bugs|
7. Contributing ....................... |easymotion-contributing|
@ -49,9 +51,10 @@ Example: >
<cursor>Lorem ipsum dolor sit amet.
Type <Leader>w to trigger the word motion |w|. See |mapleader| for details
about the leader key. When the motion is triggered, the text is updated (no
braces are actually added, the text is highlighted in red by default): >
Type <Leader>ew to trigger the word motion |w|. See
|easymotion-leader-key| for details about the leader key. 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.
@ -60,7 +63,7 @@ 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>fo, and all "o" characters are highlighted: >
Type <Leader>efo, and all "o" characters are highlighted: >
<cursor>L{a}rem ipsum d{b}l{c}r sit amet.
@ -92,9 +95,11 @@ visual and operator-pending mode:
<Leader>gE | End of WORD backward. See |gE|.
<Leader>j | Line downward. See |j|.
<Leader>k | Line upward. See |k|.
<Leader>n | Jump to latest "/" or "?" forward. See |n|.
<Leader>N | Jump to latest "/" or "?" backward. See |N|.
See |mapleader| for details about the leader key.
See |easymotion-custom-mappings| for customizing default mappings.
See |easymotion-leader-key| and |mapleader| for details about the leader key.
See |easymotion-custom-mappings| for customizing the default mappings.
==============================================================================
3. Requirements *easymotion-requirements*
@ -234,33 +239,43 @@ There are two ways to override the default colors:
4.6 Custom mappings *easymotion-custom-mappings*
EasyMotion allows you to customize all default mappings to avoid conflicts
with existing mappings. First, it is possible to change the default <leader>
key of all mappings to another key or sequence. It is also possible to fine
tune this plugin to your need by changing every single sequence.
with existing mappings. It is possible to change the default leader key
of all mappings to another key or sequence. It is also possible to fine
tune the plugin to your need by changing every single sequence.
4.6.1 EasyMotion_leader_key *easymotion-leader-key*
4.6.1 Leader key *EasyMotion_leader_key* *easymotion-leader-key*
The default leader key can be changed with the configuration option
|EasyMotion_leader_key|.
Set this option to the key sequence to use as the prefix of the mappings
described in |easymotion-default-mappings|.
Default: '<Leader>'
Note: The default leader key has been changed to '<Leader>e' to avoid
conflicts with other plugins. You can revert to the original leader by setting
this option in your vimrc: >
4.6.2 Custom Keys
let g:EasyMotion_leader_key = '<Leader>'
<
Default: '<Leader>e'
4.6.2 Custom Keys *easymotion-custom-keys*
All custom mappings follow the same variable format: >
EasyMotion_mapping_{motion} = {mapping}
<
Example: >
let g:EasyMotion_mapping_f = '_f'
let g:EasyMotion_mapping_T = '<C-T>'
<
See |easymotion-default-mappings| for a table of motions that can be mapped
and their default values.
Note: The leader key defined by EasyMotion_leader_key is not prepended to your
customized mappings. You have to give full key sequences.
Note: The leader key defined by |EasyMotion_leader_key| is not prepended to
your customized mappings! You have to provide full key sequences when setting
these options.
==============================================================================
5. License *easymotion-license*
@ -291,6 +306,7 @@ Source repository: https://github.com/Lokaltog/vim-easymotion
- Drew Neil: operator-pending mappings
- Rob O'Dwyer: customizable mappings without giving up all defaults
- Michel D'Hooge: customizable leader
- Maxime Bourget: search motion, improved JK motion behavior
EasyMotion is based on Bartlomiej Podolak's great PreciseJump script, which
can be downloaded here: